code: def authorize(self, role):
          
          resource, action = parse_request()
          roles = self.meta.get("$roles", {})
          message = "%s can't access %s.%s" % (role, resource, action)
          try:
              if action not in roles[role][resource]:
                  abort(403, "PermissionDeny", message)
          except KeyError:
              abort(403, "PermissionDeny", message)
docs: Check permission