[Django]-Check if user has one of the listed permissions in Django

3👍

if set(user.get_all_permissions()) & set(perms_list):
  pass

for the extension

a=[53,6]
b=[[53],[2,4,5]]
if any((set(x).issubset(a)) for x in b):
    print(23)

Leave a comment