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.
- Roles @ Features - More details about roles and their usage.
- Permissions @ Features - Permissions are added to roles (and authkeys and users) to control what actions a role can perform.
- AuthKeys @ Features - Roles can be attached to authentication keys to control access.
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: 4 self.new(machine_label="module_amazonalexa_api", 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.