cylc-uiserver
cylc-uiserver copied to clipboard
user-profile: add authorised-users field
Add a new field called "authorized users" (or similar) to the user-profile containing all users listed in the user's authentication config when running in multi-user mode.
This field will be used by the Cylc UI to allow quick access to the listed UI Servers via a user-name dropdown/filter box in the top-left of the UI.
Example:
c.CylcUIServer.user_authorization = {
"user1": ["read", "pause", "play"],
"group:group1": ["read"],
}
In multi-user mode (when the application class is CylcHubApp
):
user_profile = {
'kind': 'user',
'name': 'me',
'authorized users': ['user1'],
In single user mode:
user_profile = {
'kind': 'user',
'name': 'me',
'authorized users': [],
Note, we don't need to check that the listed users are authorised, if they are not that will become obvious when the user tries to access their UIS.
Pull requests welcome!