magpie.permissions
¶
Module Contents¶
Classes¶
Applicable Permission values under certain Service and Resource. |
Functions¶
|
Converts any permission representation to the |
|
Obtains the formatted permission representation after validation that it is a member of |
-
class
magpie.permissions.
Permission
[source]¶ Bases:
magpie.utils.ExtendedEnum
Applicable Permission values under certain Service and Resource.
Create and return a new object. See help(type) for accurate signature.
-
magpie.permissions.
convert_permission
(permission: AnyPermissionType) → Optional[Permission][source]¶ Converts any permission representation to the
Permission
enum.If the permission cannot be matched to one of the enum’s value,
None
is returned instead.
-
magpie.permissions.
format_permissions
(permissions: Iterable[AnyPermissionType]) → List[Str][source]¶ Obtains the formatted permission representation after validation that it is a member of
Permission
enum.The returned list is sorted alphabetically and cleaned of any duplicate entries.