raise ValidationError("Operation authorization \".\" should be True/False.")
if role_def[-1] == ":":
raise ValidationError("Operation cannot end with \".\"")
-
+
role_def_matches = [op for op in operations if op.startswith(role_def)]
if len(role_def_matches) == 0:
"""
roles = self.auth.get_role_list()
system_admin_role = [role for role in roles
- if roles["name"] == "system_admin"][0]
+ if role["name"] == "system_admin"][0]
if _id == system_admin_role["_id"]:
raise EngineException("You cannot delete system_admin role", http_code=HTTPStatus.FORBIDDEN)