T
T
The-TS2021-01-16 23:42:52
Django
The-TS, 2021-01-16 23:42:52

How to get ALL user rights?

Hi
How can I find out ALL user rights by username from the code, given that I have my own permissions in the models?
I'm using Django 3.1.5
Thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-01-17
@Pyhon3x

If it is the user's permissions, then user.get_user_permissions() , and if they are also group permissions, then user.get_all_permissions() .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question