Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add SessionAuthHasPerm and SessionAuthHasPerms for permission-based… #1372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mohammadhasananisi
Copy link

This pull request introduces new authentication classes and updates the relevant files to include these new classes. The main changes involve adding SessionAuthHasPerm and SessionAuthHasPerms classes, which extend the existing session authentication mechanism to include permission checks.

New authentication classes:

  • ninja/security/session.py: Added SessionAuthHasPerm class to check if a user has a specific permission, and SessionAuthHasPerms class to check if a user has a list of permissions.

Updates to __init__.py:

Test updates:

  • tests/test_auth.py: Imported the new SessionAuthHasPerm and SessionAuthHasPerms classes and added test cases to validate their functionality. [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant