Skip to main content

TODO

Project description

1 Welcome to maykin-auth-matrix’s documentation!

Version:

0.1.0

Source:

https://github.com/maykinmedia/maykin-auth-matrix

Keywords:

<keywords>

PythonVersion:

3.10

Build status Code quality checks black Coverage status Documentation Status

python-versions django-versions pypi-version

DigiD Compliant Authorization Matrix for the administation of Django projects.

2 Features

  • Display a matrix of permissions for the groups

  • Display a matrix of groups for the users

  • Allows to export the matrix in different formats

3 Installation

3.1 Requirements

  • Python 3.10 or above

  • Django 4.2 or newer

3.2 Install

pip install maykin-auth-matrix

4 Usage

Add the URL to your Django project’s urls.py:

from django.contrib import admin
from django.urls import path, include
from auth_matrix.views import AuthMatrixView

urlpatterns = [
    path(
        "admin/authorization/",
        include("auth_matrix.admin_urls"),
    ),
]

# Display the Authorization Matrix

Authorization Matrix

Navigate to the Groups admin page and click on the “Authorization Matrix” link to view the matrix.

Show Authorization Matrix Button

# Export the Authorization Matrix

On the top right corner of the Groups admin page, you can choose to export the matrix to different formats.

Click the EXPORT button and chose the format you want to export the matrix to.

Export Authorization Matrix Button
You can pick between two resources:
  • UserGroupResource : exports the matrix with users as rows and groups as columns

  • GroupPermissionsResource : exports the matrix with permissions as rows and groups as columns

Export Authorization Matrix Formats

5 Local development

To install and develop the library locally, use:

.. code-block:: bash

pip install -e .[tests,coverage,docs,release]

When running management commands via django-admin, make sure to add the root directory to the python path (or use python -m django <command>):

export PYTHONPATH=. DJANGO_SETTINGS_MODULE=testapp.settings
django-admin check
# or other commands like:
# django-admin makemessages -l nl

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

maykin_auth_matrix-0.1.1.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

maykin_auth_matrix-0.1.1-py3-none-any.whl (9.3 kB view hashes)

Uploaded Python 3

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