Library: roles

From Yombo
Jump to: navigation, search
Commonly Used Yes
Status Active

Roles group permissions together and can be assigned to users and authentication keys.


Users and authentication keys are assigned roles, such as "admin" and "device manager". Permissions are assigned to roles to grant (or revoke) various permissions. See permission feature for more details.

Roles can be managed from the web interface.

See also


No hooks registered.


Step 1: Create role

Creating a role within a module very simple. First, check to make sure the role doesn't already exist. If it doesn't, simply create one.

1 try:
2     self.role = self._Roles.get("module_amazonalexa_api")
3 except KeyError:
5         label="Amazon Alexa - API",
6         description="Used by Amazon Alexa to make requests to this module. No one else should have this role."
7         created_by="amazonalexa",
8         created_by_type="module"
9     )

Step 2: Attach permissions

See permissions for details on adding a new permissions to the role.

This page was last edited on 23 July 2019.