rs_server_catalog/authentication_catalog.md
Contains all functions used to manage the authentication in the catalog.
get_authorisation(requested_col_ids, auth_roles, requested_action, requested_owner_id, user_login, owner_prefix=False)
Check if the user is authorized to access collections.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
requested_col_ids
|
list
|
IDs of the requested collections. |
required |
auth_roles
|
list
|
The list of authorisations for the user_login. |
required |
requested_action
|
str
|
Requested action (read, write or download) on the collections. |
required |
requested_owner_id
|
str
|
The name of the owner of the collection {collection_id}. |
required |
user_login
|
str
|
The owner of the key linked to the request. |
required |
owner_prefix
|
bool
|
True if the collection IDs are prefixed by their collection |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the user is authorized, else False |
Source code in docs/rs-server/services/catalog/rs_server_catalog/authentication_catalog.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |