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
File details
Details for the file django-auth-additions-0.6.7.tar.gz
.
File metadata
- Download URL: django-auth-additions-0.6.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d636a86fb690316ad97ceb574836f4dedcde4183e52d301995770ad2b2797611 |
|
MD5 | 005d5eb4b1f60829f9ace927f4882c12 |
|
BLAKE2b-256 | 4ca143f4979b23d64a17e3e692324e5fc79548d391e8f6787fcb62db226bfa74 |