magpie.api.management.register.register_utils
¶
Module Contents¶
Functions¶
|
Get all existing group that are marked as publicly discoverable from the database. |
|
Obtains the requested discoverable group by name. |
-
magpie.api.management.register.register_utils.
get_discoverable_groups
(db_session: Session) → List[Group][source]¶ Get all existing group that are marked as publicly discoverable from the database.
-
magpie.api.management.register.register_utils.
get_discoverable_group_by_name
(group_name: Str, db_session: Session) → Group[source]¶ Obtains the requested discoverable group by name.
Note
For security reason, an existing group that is NOT discoverable will return NotFound instead of Forbidden. Otherwise we give an indication to a potentially non-admin user that some group of that name exists.
- Returns
found group matched by name
- Raises
HTTPNotFound – if the group cannot be found or if matched group name is not discoverable.