Utils
org_role_is_valid(group_or_org_id, username)
ΒΆ
Determine whether the given user has a valid role in the specified group or organisation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_or_org_id
|
ID of a group or organisation |
required | |
username
|
username for the user to check |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if the role is valid (member, editor, or admin), False otherwise |
Source code in ckanext/userdatasets/logic/utils.py
10 11 12 13 14 15 16 17 18 19 20 21 | |