Пример #1
0
 def CheckAccess(cls, request):
     """If the user is not in the AUTHORIZED_LABELS, reject this renderer."""
     user_managers.CheckUserForLabels(request.token.username,
                                      cls.AUTHORIZED_LABELS,
                                      token=request.token)
Пример #2
0
 def CheckIfUserIsAdmin(self, token=None):
     user_managers.CheckUserForLabels(token.username, ["admin"],
                                      token=token)