groups_for_user
Authorize a user based on groups
def groups_for_user(
environ: dict,
username: string
) - > array
Authorize a user based on groups
Parameters
| Name | Type | Description |
|---|---|---|
| environ | dict | The WSGI environment dictionary containing request metadata |
| username | string | The natural key identifier used to look up the user in the database |
Returns
| Type | Description |
|---|---|
array | A list of byte-encoded group names associated with the user, or an empty list if the user is inactive or does not exist |