class plinth.modules.users.components.UsersAndGroups(component_id, reserved_usernames=[], groups={})[source]

Component to manage users and groups of an app.

__init__(component_id, reserved_usernames=[], groups={})[source]

Store reserved_usernames and groups of the app.

‘reserved_usernames’ is a list of operating system user names that the app uses. It is not permitted to create a FreedomBox user with one of these names.

‘groups’ is a dictionary of the following format: {“group_name”: “A localized string describing what permissions are offered to the users of this group”}.

classmethod get_group_choices()[source]

Return list of groups that can be used as form choices.

classmethod get_groups()[source]

Return a set of all groups.

classmethod is_username_reserved(username)[source]

Returns whether the given username is reserved or not.