Exemplo n.º 1
0
 def has_permission(self, request, view):
     if userHasPerm(request, "users.view_user") and request.method == "GET":
         return True
     if userHasPerm(request,
                    "users.delete_user") and request.method == "DELETE":
         return True
     return False
Exemplo n.º 2
0
 def has_permission(self, request, view):
     if request.method == "GET":
         return userHasPerm(request, "fileSystem.can_show_fileSystem")
     else:
         return userHasPerm(request, "fileSystem.can_create_fileSystem")
Exemplo n.º 3
0
 def has_permission(self, request, view):
     return userHasPerm(request, "other.other_perm")
Exemplo n.º 4
0
 def has_permission(self, request, view):
     if request.method == "GET":
         return userHasPerm(request, "treasurer.can_show_treasurer")
     else:
         return userHasPerm(request, "treasurer.can_create_treasurer")
Exemplo n.º 5
0
 def has_permission(self, request, view):
     return userHasPerm(request, "timetable.view_lesson")
Exemplo n.º 6
0
 def has_permission(self, request, view):
     if request.method == "GET":
         return userHasPerm(request, "events.can_show_events")
     else:
         return userHasPerm(request, "events.can_create_events")