You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class ActionEnum:
VIEW_FOO = EnumField("view_foo", label="", metadata={"role": ["operator"], "related_resource_type": "foo"})
class AuthorizationScopes:
def get_scopes(self, role):
field_members = ActionEnum.get_field_members()
action_fields = [field for field in field_members.values() if role in field.metadata.get("role", [])]
resource_type_to_actions = defaultdict(list)
for field in action_fields:
resource_type_to_actions[field.metadata["related_resource_type"]].append(field.real_value)
No description provided.
The text was updated successfully, but these errors were encountered: