0

I want to restrict access to certain views based on the current User's email address. Are Permissions the way to go here? My thought is "no" because, as far as I understand, permissions are for model objects.

ukejoe
  • 737
  • 2
  • 9
  • 20
  • you can always create your own view decorator... – Sasa Aug 29 '16 at 20:18
  • Sure, why not? That way you can assign that permission to that specific user object.. – karthikr Aug 29 '16 at 20:22
  • If I do it that way the only way I could use `user.has_perm` would be if I created my own authentication backend which isn't the end of the world. – ukejoe Aug 29 '16 at 20:42
  • Probably you can use different groups for different email ids and then use simple if else conditions in your template to redirect the users accordingly. – Ankush Raghuvanshi Aug 30 '16 at 12:27

0 Answers0