A tool to analyze your Django app access control
Project description
Django Access Inspector
Django Access Inspector is a comprehensive access control app for Django that helps you enforce fine-grained access control on your views. It provides a flexible and easy-to-use interface to check and analyze authentication and permission classes for each view in your Django project.
Installation
To install Django Access Inspector, you can use either pip
or poetry
. Here are the commands:
pip install django-access-inspector
poetry add django-access-inspector
After installing, make sure to add "django_access_inspector"
to your INSTALLED_APPS
setting in your Django project's settings.py
file:
INSTALLED_APPS = [
...,
"django_access_inspector",
]
Usage
To run Django Access Inspector, use the following command:
python manage.py inspect_access_control
By default, it will provide a human-readable output. If you prefer a JSON output, you can use the --output json
flag:
python manage.py inspect_access_control --output json
Example
Here's an interpretation of the output:
- Unchecked views: Views that Django Access Inspector was not able to check. As the tool is still a work in progress, we aim to make it check all views in the future.
- Model Admin views: Views generated by Django Admin that are checked with the Django Admin permission system.
- Views: All views that Django Access Inspector was able to check, including their authentication and permission classes.
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
Built Distribution
File details
Details for the file django_access_inspector-0.2.1.tar.gz
.
File metadata
- Download URL: django_access_inspector-0.2.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41f94325b33d59f9d9a9f98d31650889599278407009b2c4ca25293c4c6b4d84 |
|
MD5 | ddaec7fbb406bad17f4c6c394e339088 |
|
BLAKE2b-256 | 5c5ee984500ad4f4adc4c6a3907e46bdd68a5a737b7a9fc54ae8a013bb6047cc |
File details
Details for the file django_access_inspector-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: django_access_inspector-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f3870214c221f8a4d176b092901ec1cfe44e4059283ff511ce641706397bd5 |
|
MD5 | 723c2bbc2cefcd58ef4cf4d7663dca5b |
|
BLAKE2b-256 | faf47c6043ca9a299495b65530d7839554daf271914fc1211d15b3d0f214d919 |