Skip to main content

DJANGO GROUP_USER_PERMISSIONS

🔍 Overview

This package was developed because Django REST Framework (DRF) does not provide a built-in solution to check both user-level and group-level permissions in one place.

django-group-user-permissions is a custom DRF permission class that combines permissions assigned directly to a user and those inherited from the user’s groups. It simplifies permission handling in DRF-based APIs by dynamically checking permissions based on the request method and the model associated with the view.


📦 Installation

pip install django-group-user-permissions

⚙️ Configuration

  1. Add to INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
    
    "django-group-user-permissions",
]
  1. Import the permission class in your views:
from django_group_user_permissions.group_user_permissions import GroupUserPermissions
  1. 🚀 Usage in Views
permission_classes = [GroupUserPermissions]

✅ What It Does Maps HTTP methods to Django permission codenames:

GET → view_

POST → add_

PUT / PATCH → change_

DELETE → delete_

Checks if the user has required permission either:

Directly assigned to the user

Through any group the user belongs to

Metadata

Release files for django-group-user-permissions 0.0.2

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-group-user-permissions 0.0.2
File Size Uploaded Provenance Actions
django_group_user_permissions-0.0.2.tar.gz 3.3 kB Without provenance Details for django_group_user_permissions-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-group-user-permissions 0.0.2
File Interpreter ABI Platform Actions
django_group_user_permissions-0.0.2-py3-none-any.whl Python 3 none any Details for django_group_user_permissions-0.0.2-py3-none-any.whl

Total release size: 7.3 kB

Release files / django_group_user_permissions-0.0.2.tar.gz

Download URL django_group_user_permissions-0.0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
767b4976e3811a7b4f48701fa2e551387a373d44e072e44cd834f6b28fc501bf
BLAKE2b-256 checksum
How to use checksums
049fe68aae5bc8943856678276611155ebb7238bf539e60f35207f157cefb7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / django_group_user_permissions-0.0.2-py3-none-any.whl

Download URL django_group_user_permissions-0.0.2-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3760bef04fde77121eace54573262103f8674d302ce07d848d8982f796ff0836
BLAKE2b-256 checksum
How to use checksums
eec94be655a68ba8d9e98b46ff761226bc6729321cc335d05cb4bb709ef2930e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for django-group-user-permissions 0.0.2

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.0.2 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