magpie.ui.management.views¶
Attributes¶
Classes¶
Regroups multiple administration-level operations to be dispatched to the API requests. |
Module Contents¶
- class magpie.ui.management.views.ManagementViews(request)[source]¶
Bases:
magpie.ui.utils.AdminRequests
,magpie.ui.utils.BaseViews
Regroups multiple administration-level operations to be dispatched to the API requests.
- add_user()[source]¶
User creation by a logged administrator.
Note
The template employed for this form is reused for user self-registration as the fields and validation of inputs are essentially the same. Their actual processing is different though, as the administrator user is already logged in this case, and nobody is logged in the other.
- edit_user()[source]¶
Edit the fields of any referenced user profile by an administrator.
See also
magpie.ui.user.views.UserViews.edit_current_user()
for corresponding operation by user self-update
- view_pending_user()[source]¶
Displays a pending user registration profile details.
Note
View configuration is added dynamically because this page it should be available only when the corresponding feature is activated with configuration settings.
- get_user_or_group_resources_permissions_dict(user_or_group_name, services, service_type, is_user=False, is_inherit_groups_permissions=False)[source]¶
Get the user or group applied permissions as well as applicable permissions for corresponding services.
- Result is a
tuple
of: combined Allowed Permissions (names only) for services and their children Resources.
dictionary of key-service-name, each with recursive map value of children resource details including the Applied Permissions or Inherited Resources for the corresponding User or Group accordingly to specified arguments.
- Result is a
- sync_services(services: Dict[magpie.typedefs.Str, magpie.typedefs.JSON]) Tuple[List[magpie.typedefs.Str], magpie.typedefs.Str | None] [source]¶
Syncs specified services.
- Returns:
names of services that produced a sync error and corresponding sync message (if any).