예제 #1
0
 def wrapper(*args, **kwargs):
     if authorization.fulfills_role(role):
         return f(*args, **kwargs)
     else:
         raise ForbiddenError("You must be a %s to do that." % role)
 def get(self, role):
     return {
         'role': role,
         'authorized': authorization.fulfills_role(role)
     }