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.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

django_access_inspector-0.2.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for django_access_inspector-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e9e3858351e8f96ae72b6b55753f7753c90c6877a23ae3c39c6cfa336d4840ef
MD5 ef24f2b9248a1a05dc7654e17a82bce0
BLAKE2b-256 5139b07297ba86ffedb9f5af911bf72ec6566d9983999d06c47ff369b325d052

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_access_inspector-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a00d9ba3c39498bd94af3f60c2ac1d8245b66916eb94aa35a8dc99fabe9f282
MD5 47dee0a5bfbfbd7cfae606756f04991a
BLAKE2b-256 8917e4c0a1c41f125b41c307c9ccbc3efcfa1abbc9ab4bc6e71846fa7896438b

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