Skip to main content

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

cli example output

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


Download files

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

Source Distribution

django_access_inspector-0.2.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

django_access_inspector-0.2.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file django_access_inspector-0.2.1.tar.gz.

File metadata

File hashes

Hashes for django_access_inspector-0.2.1.tar.gz
Algorithm Hash digest
SHA256 41f94325b33d59f9d9a9f98d31650889599278407009b2c4ca25293c4c6b4d84
MD5 ddaec7fbb406bad17f4c6c394e339088
BLAKE2b-256 5c5ee984500ad4f4adc4c6a3907e46bdd68a5a737b7a9fc54ae8a013bb6047cc

See more details on using hashes here.

File details

Details for the file django_access_inspector-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_access_inspector-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2f3870214c221f8a4d176b092901ec1cfe44e4059283ff511ce641706397bd5
MD5 723c2bbc2cefcd58ef4cf4d7663dca5b
BLAKE2b-256 faf47c6043ca9a299495b65530d7839554daf271914fc1211d15b3d0f214d919

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