Skip to main content

Django Auth Manager

This is a Django extension that extends manage.py commands and provides the ability to retrieve information about users, groups and their permissions.

Installation

Install using PIP:

pip install django-auth-manager

Add django_auth_manager to INSTALLED_APPS:

INSTALLED_APPS += ["django_auth_manager"]

Usage

This extension provides you with additional manage.py commands. The information below describes how to use them.

Fetch All Users and Their Permissions

The fetch_users script outputs the information about a user and their permissions. Here is an example for getting information for all the users:

$ ./manage.py fetch_users
User: nadzeya (nadzya.info@gmail.com)
  This is a superuser.
  The permissions below will be kept with a user even if you remove the superuser bit from their account.
  No permissions found.
User: testuser
  Permissions:
  - view_userexperience
  - add_topic
  - change_topic
  - delete_topic
  - view_topic
  - add_task
  - change_task
  - delete_task
  - view_task
  - view_userwordprogress
  - add_word
  - change_word
  - delete_word
  - view_word
  - view_usertaskprogress
  - add_userexperience
  - change_userexperience
  - delete_userexperience

You can also specify a username to get information for a specific user:

./manage.py fetch_users -u testuser
User: testuser
  Permissions:
  - view_userexperience
  - add_topic
  - change_topic
  - delete_topic
  - view_topic
  - add_task
  - change_task
  - delete_task
  - view_task
  - view_userwordprogress
  - add_word
  - change_word
  - delete_word
  - view_word
  - view_usertaskprogress
  - add_userexperience
  - change_userexperience
  - delete_userexperience

Fetch Information About Groups

The fetch_groups command outputs all the groups, users in these groups, and the group permissions for each group. You can output the data in either YAML or table format:

$ ./manage.py fetch_groups --yaml
- name: Developers
  permissions:
  - view_user
  - view_token
  - view_emailverificationcode
  - view_passwordresettoken
  - view_task
  - change_topic
  - view_topic
  - view_userexperience
  - view_usertaskprogress
  - view_userwordprogress
  - view_word
  users: []
- name: Administrators
  permissions:
  - add_task
  - change_task
  - delete_task
  - view_task
  - add_topic
  - change_topic
  - delete_topic
  - view_topic
  - add_userexperience
  - change_userexperience
  - delete_userexperience
  - view_userexperience
  - view_usertaskprogress
  - view_userwordprogress
  - add_word
  - change_word
  - delete_word
  - view_word
  users:
  - testuser

Here you can see how the table format looks:

$ ./manage.py fetch_groups --table
Group          | User     | Permission                
------------------------------------------------------
Developers     | No users | view_user                 
               |          | view_token                
               |          | view_emailverificationcode
               |          | view_passwordresettoken   
               |          | view_task                 
               |          | change_topic              
               |          | view_topic                
               |          | view_userexperience       
               |          | view_usertaskprogress     
               |          | view_userwordprogress     
               |          | view_word                 
------------------------------------------------------
Administrators | testuser | add_task                  
               |          | change_task               
               |          | delete_task               
               |          | view_task                 
               |          | add_topic                 
               |          | change_topic              
               |          | delete_topic              
               |          | view_topic                
               |          | add_userexperience        
               |          | change_userexperience     
               |          | delete_userexperience     
               |          | view_userexperience       
               |          | view_usertaskprogress     
               |          | view_userwordprogress     
               |          | add_word                  
               |          | change_word               
               |          | delete_word               
               |          | view_word                 
------------------------------------------------------

By specifying -g $GROUP_NAME, you can fetch the information about a specific group:

$ ./manage.py fetch_groups --table -g Administrators
Group          | User     | Permission           
-------------------------------------------------
Administrators | testuser | add_task             
               |          | change_task          
               |          | delete_task          
               |          | view_task            
               |          | add_topic            
               |          | change_topic         
               |          | delete_topic         
               |          | view_topic           
               |          | add_userexperience   
               |          | change_userexperience
               |          | delete_userexperience
               |          | view_userexperience  
               |          | view_usertaskprogress
               |          | view_userwordprogress
               |          | add_word             
               |          | change_word          
               |          | delete_word          
               |          | view_word            
-------------------------------------------------

Metadata

Release files for django-auth-manager 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-auth-manager 0.1.0
File Size Uploaded Provenance Actions
django_auth_manager-0.1.0.tar.gz 4.8 kB Without provenance Details for django_auth_manager-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-auth-manager 0.1.0
File Interpreter ABI Platform Actions
django_auth_manager-0.1.0-py3-none-any.whl Python 3 none any Details for django_auth_manager-0.1.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / django_auth_manager-0.1.0.tar.gz

Download URL django_auth_manager-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2371e74284a5277e7665b6ca30ee3d9136b4f84efaab87d32970ada933821227
BLAKE2b-256 checksum
How to use checksums
85d2c1e3c55caf030b62d052a0f06571a2b33ca309fcaf541d9ca4a1ed5303b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / django_auth_manager-0.1.0-py3-none-any.whl

Download URL django_auth_manager-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5381007e292c8c008ee682249e597f75adc5d444221f67b13600023c596a0735
BLAKE2b-256 checksum
How to use checksums
3f8f2654a345b33aa255ed5415aac87939ab74e88e644ed85c376239a378608e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Security for django-auth-manager 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page