Contribution: new management commands for contrib.auth (grantpermissions, revokepermissions)

Dear Django team,

I developed two management commands grantpermissions and revokepermissions for our CMS based on Django CMS. That was very useful to simply grant plugin permissions for many plugins across different CMS instances.

Under the hood, Django CMS plugin permissions are entirely based on django.contrib.auth.models.Permission, django.contrib.auth.models.Group and django.contrib.contenttypes.models.ContentType, i.e. the commands I implemented only depend on the contenttypes and auth contrib applications. Thus I decided to contribute those commands and the related unit tests to the Django project. Currently they are only committed in our private git infrastructure and not yet publicly available.

I create this topic to collect feedback if this sounds like a rational contribution and if you are interested in it by filing a PR against the django GitHub repository.

yours sincerely,
Florian Schieder from Germany

Welcome @florianschieder !

It is common practice for proposals such as this to first be created and distributed as a third-party package. This allows for people to take a look at it and to try it, to see if it does satisfy a particular need.

I published the commands at GitHub - puzzleYOU/django-permission-commands: Django management commands for ruling groups and permissions based on django.contrib.auth as well a sample app (README included) to try them out.

Please let me know if there are any questions or problems.