magpie.api.management.network.remote_user.remote_user_utils¶
Functions¶
|
Return the NetworkRemoteUser with the same name as |
|
Return the |
Raises an error if the currently logged-in user has permission to view/modify the |
Module Contents¶
- magpie.api.management.network.remote_user.remote_user_utils._remote_user_from_names(node_name: magpie.typedefs.Str, remote_user_name: magpie.typedefs.Str, db_session: magpie.typedefs.Session) magpie.models.NetworkRemoteUser[source]¶
Return the NetworkRemoteUser with the same name as
remote_user_nameassociated with theNetworkNodenamednode_name.
- magpie.api.management.network.remote_user.remote_user_utils.requested_remote_user(request: pyramid.request.Request) magpie.models.NetworkRemoteUser[source]¶
Return the
NetworkRemoteUseridentified by the request path.For example: if the current request contains the path
/nodes/nodeA/remote_users/userBthis will return theNetworkRemoteUserwith the name userB that is associated with theNetworkNodewith the name nodeA.
- magpie.api.management.network.remote_user.remote_user_utils.check_remote_user_access_permissions(request: pyramid.request.Request, remote_user: magpie.models.NetworkRemoteUser | None = None) None[source]¶
Raises an error if the currently logged-in user has permission to view/modify the
remote_usermodel. Ifremote_useris None, the requested remote user will be extracted from the request path.Admins are allowed to access any model. Other users are only allowed to access those that they are associated with.