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

Valid for Django 4.2 #143

Open
anjanesh opened this issue Mar 2, 2023 · 5 comments
Open

Valid for Django 4.2 #143

anjanesh opened this issue Mar 2, 2023 · 5 comments

Comments

@anjanesh
Copy link

anjanesh commented Mar 2, 2023

Is django-role-permissions still valid for Django 4.2 ?

@fjsj
Copy link
Member

fjsj commented Mar 3, 2023

Hi, it should be. If you face any issues, please mention them here.

@anjanesh
Copy link
Author

anjanesh commented Mar 4, 2023

My point being, doesn't Django provide these out of the box now ? Or does django-role-permissions provide something that Django doesn't ?

@fjsj
Copy link
Member

fjsj commented Mar 6, 2023

@anjanesh I see. Which feature of Django 4+ makes permissions role-based?
I looked at the changelogs but couldn't find.

@anjanesh
Copy link
Author

anjanesh commented Mar 7, 2023

Something I got done using extending Django's default User Model - https://anjane.sh/user-model - Modifying AUTH_USER_MODEL in Django for a brand new Django project

Isn't this what's role based permission is all about ?

image

I can make selections based on currently logged-in user's roles and groups :

    current_user = request.user

    print("current_user = ", current_user)
    print("current_user's role = ", current_user.role)
    groups = request.user.groups.values_list('name', flat=True)
    
    print("current_user's groups = ", groups)

@fjsj
Copy link
Member

fjsj commented Jun 1, 2023

@dennys-bd

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

No branches or pull requests

2 participants