bluesky_queueserver_api.zmq.REManagerAPI.permissions_reload¶
- REManagerAPI.permissions_reload(*, restore_plans_devices=None, restore_permissions=None, lock_key=None)¶
Generate the new lists of allowed plans and devices based on current user group permissions and the lists of existing plans and devices. User group permissions and the lists of existing plans of devices may be restored from disk if the parameters
restore_permissions
andrestore_plans_devices
are setTrue
. By default, the method will use current lists of existing plans and devices stored in memory and restores permissions from disk. The method always updates UIDs of the lists of allowed plans and devices even if the contents remain the same.- Parameters:
- restore_plans_devices: boolean (optional)
Reload the lists of existing plans and devices from disk if True, otherwise use current lists stored in memory. Default:
False
.- restore_permissions: boolean (optional)
Reload user group permissions from disk if True, otherwise use current permissions. Default:
True
.- lock_key: str or None (optional)
The lock key enables access to the API when RE Manager queue is locked. If the parameter is not
None
, the key overrides the current lock key set byREManagerAPI.lock_key
. See documentation onREMangerAPI.lock()
for more information. Default:None
.
- Returns:
- response: dict
Dictionary keys:
success
: boolean - success of the request.msg
: str - error message in case the request is rejected by RE Manager or operation failed.
- Raises:
- RequestTimeoutError, RequestFailedError, HTTPRequestError, HTTPClientError, HTTPServerError
All exceptions raised by
send_request
API.
Examples
# Synchronous code (0MQ, HTTP) RM.permissions_reload() # Asynchronous code (0MQ, HTTP) await RM.permissions_reload()