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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-auth-additions-0.6.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c39304abcfc6222656102f5a8ef7754ee1c02a0868f4b11dea824a6f9a082c |
|
MD5 | 63f3ecdb4d5a4f8852205fb1688e74ea |
|
BLAKE2b-256 | 8ba36b9414dfe9bb80f4544761f64a4cb463f04d0e787cc3d2d6796bcca7aef2 |