Skip to main content

Additions (monkey-patches) to auth models.

Project description

Adds some bits that help make django.contrib.auth a bit more useful.

Group gains a ‘rank’ field, that can be used to rank groups (useful where groups need to be able to be limited to view only groups ‘lower’ than they are).

Group gains a .duplicate() method, that will duplicate a group, including all of it’s permissions.

User gains methods for custom permissions:
  • can_view(object)

  • can_edit(object)

  • can_delete(object)

  • can_create(class)

These will use the current permissions, but also allow for methods to be added on the object/class being tested, which can permit or deny access according to custom rules. I use this for instance to only allow staff to view other staff who work at the same location(s).

Future: * Configure using data from DJANGO_SETTINGS_MODULE * Unique email addresses * Non-nullable email * Index on email * Random username on save (or email?) * email in template (?)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-auth-additions-0.7.0.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file django-auth-additions-0.7.0.tar.gz.

File metadata

File hashes

Hashes for django-auth-additions-0.7.0.tar.gz
Algorithm Hash digest
SHA256 afaa781d6893c44cd176da6a1f5feaef580f16d745d7ef17261260d424f9b761
MD5 745c6db5b5a8f1e9df4fc27389cc8f75
BLAKE2b-256 545b83d8df337dc578001a941a661aa34f7505428f35f254e04e2e3d861c2803

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page