1

I have created a user and assigned it to a group from django admin panel. I have given certain permissions to that group. However, when I catch the request in my view, it seems that the associated user has no permission at all. I'm using JWT web token based authentication system. Any ideas?

QuestionEverything
  • 4,809
  • 7
  • 42
  • 61

1 Answers1

3

user_permissions just contains the permissions explicitly assigned to the user. To also get those that are implicitly assigned as part of group membership, you need to use get_all_permissions().

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
  • hay man, if u have a little time, im aprecciate : https://stackoverflow.com/questions/70731384/custom-user-return-empty-get-all-permissions?noredirect=1#comment125044013_70731384 – MagicHat Jan 16 '22 at 19:26