# Users

## Overview

This gives a quick overview about users, their roles, and permissions.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-11a6b5e87fe1bea28c89a20fc53637448ae43872%2Fusers_and_roles_view.png?alt=media" alt=""><figcaption></figcaption></figure>

## Adding a New User

1. To add a user, click `+ Add User`.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-bc4d06e4ae088f8e7c76b457542c01feff2981a3%2Fusers_add.png?alt=media" alt=""><figcaption></figcaption></figure>

### Simple Mode

2. Enter the username, password and password confirmation in the *Create User* dialog. If needed, additional select any already existing *Role* in the *Roles* field if you want to assign the role to the user. Then click `CREATE`. The dialog will close and the new user will be visible in the overview table.

(The username and password must fulfill the noted criteria.)

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-941b7ef23a15d806cdd1d37c02bfd9cf773fd63b%2Fusers_create.png?alt=media" alt=""><figcaption></figcaption></figure>

### Advanced Mode

To activate advanced mode, toggle the switch in the top right of the dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-f1e236570564d281a4b159cfc9b5285da67d0a89%2Fusers_create_advanced_mode.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Here you can additionally add individual permissions to the new user. To do so, click the + in the toolbar.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-c5b45ff0f91afd92fe0a4a73b2210e468571690b%2Fusers_create_advanced_add_permission.png?alt=media" alt=""><figcaption></figcaption></figure>

4. In the *Add Permissions* dialog select the type of permission you want to add.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-94d4e5329ae614e7706de50cd3aea0eadda8e402%2Fusers_create_advanced_add_permission_modal.png?alt=media" alt=""><figcaption></figcaption></figure>

Enter the resource path (both MQTT and HTTP follow MQTT topic conventions) and select the access type (`read`, `write` or both) the permission should be valid for. The specified topic can be either a single topic or a wildcard.

The resource path on HTTP permissions follow an MQTT topic structure. This means wildcards ( “#” and “+”) can be used for valid expressions and paths should start with a leading “slash”.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-b02ef1a38b7474d6232cbc79e74bf4bbce1cadfa%2Fusers_add_permission.png?alt=media" alt=""><figcaption></figcaption></figure>

The assigned *Additional Permissions* can be either MQTT (for accessing the MQTT topics on the broker) or HTTP (for accessing the REST API using HTTP clients). Press the `ADD` button to add a permission.

However, the suggested way of assigning permissions is not to assign individual permissions in this dialog, but rather using *roles*, see [Add Role to User](#adding-roles-to-users) below. Nevertheless sometimes it is useful to assign individual permissions, so these steps will be explained in the following.

5. When all permissions have been added, create the new user by clicking the `CREATE` button.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-40dd2ef4b3d357915f10514eed7b212572395918%2Fusers_create_advanced_create.png?alt=media" alt=""><figcaption></figcaption></figure>

## Editing Users

1. On the navigation panel, click `User`.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-e8d197abed3d77bec60ccf84f3b7a49c81a91450%2Fnavigation_panel_user.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click on the table row of the user you would like to edit.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-c7d147865056769f4ac2e59d4123bcb3c2098ef0%2Fusers_select.png?alt=media" alt=""><figcaption></figcaption></figure>

### Changing Passwords

1. Click on the `Change Password` button in the user detail view.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-728af46d8b8bdab09bca45aa2d3d78b722a9562a%2Fusers_update_password_button.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Type in the new password twice and click the `UPDATE` button in the dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-142339f8d7b2672865e397fc0d499752af0e04df%2Fusers_update_password_dialog.png?alt=media" alt=""><figcaption></figcaption></figure>

### Adding Roles to Users

1. Click on the roles dropdown to open the options list.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-1df9b7c4a82517becb7c1f05792ce6e77c024220%2Fusers_update_add_role.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Select Roles you want to add to the user by clicking on the options in the dropdown. They will be shown in the text field next to each other.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-437dc879e71f49300d5c7f8091ce4d1f63984bf6%2Fusers_update_add_role_dropdown_options.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Save the changes by clicking the `UPDATE` button in the bottom right.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-114cc9761943a82697a7048312824a68c3c2e5fb%2Fusers_update_add_role_confirm.png?alt=media" alt=""><figcaption></figcaption></figure>

### Deleting Roles from Users

1. Click on the `x` right next to the role name in the roles field to remove this role.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-cdaf8133f89bdd23afb5a3c9519a6e061154a3d9%2Fusers_update_remove_role.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Save the changes by clicking the `UPDATE` button in the bottom right.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-82cd473c789239a4f8c6882c64566557553a4ffe%2Fusers_update_remove_role_confirm.png?alt=media" alt=""><figcaption></figcaption></figure>

### Adding Individual Permissions to Users

1. Toggle the `Advanced mode` switch in the top right of the dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-ef1686bc38c461e73eb7f4a5832c82d7031172f2%2Fusers_update_advanced_mode.png?alt=media" alt=""><figcaption><p>This will extend the dialog with an <code>Additional permissions</code> section.</p></figcaption></figure>

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-3afe80178e0c3343d8397676637d00244f1a978b%2Fusers_update_advanced_view.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click the + in the new section to add individual permissions to the user.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-2aac54e862bdac7ca57861d822b877538bfcaf8a%2Fusers_update_advanced_add_permission.png?alt=media" alt=""><figcaption></figcaption></figure>

3. In the *Add Permissions* dialog, select the type of permission you want to add.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-f8536ee21738e38ed60fb4d7d939ce2091ab00f1%2Fusers_update_advanced_add_permission_modal.png?alt=media" alt=""><figcaption></figcaption></figure>

Enter the resource path (both HTTP and MQTT follow MQTT topic structures) and select the access type (`read`, `write` or `read and write` for both) the permission should be valid for. The specified topic can be either a single topic or a wildcard.

The resource path on HTTP permission follow an MQTT topic structure. This means both wildcards ( “#” and “+”) are valid expressions and paths should start with a leading “slash”.

4. When all permissions have been added, update the user by clicking the `UPDATE` button.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-5a4b9ccccd78730383b81f80dc06c1aca523ab9f%2Fusers_update_advanced_create.png?alt=media" alt=""><figcaption></figcaption></figure>

### Deleting Permissions from User

1. Toggle the `Advanced mode` switch in the top right of the dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-ef1686bc38c461e73eb7f4a5832c82d7031172f2%2Fusers_update_advanced_mode.png?alt=media" alt=""><figcaption><p>This will extend the dialog with an <code>Additional permissions</code> section.</p></figcaption></figure>

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-19bce2114104c9b2ac88e56bc705230d12f7ab54%2Fusers_update_advanced_view_2.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click the `Remove` button in the action column for the permission you want to remove.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-5248a9bd6f303e8d17c6cbbc2c755e2f9a3a4973%2Fusers_update_advanced_remove_permission.png?alt=media" alt=""><figcaption></figcaption></figure>

3. The permission does no longer show in the Additional permissions section. Confirm the changes by clicking the `UPDATE` button.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-e3a3e0841924e32cf817da03b5f66395be3256d8%2Fusers_update_advanced_remove_permission_confirm.png?alt=media" alt=""><figcaption></figcaption></figure>

## Deleting Users

1. Click on the table row of the user you would like to delete.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-c7d147865056769f4ac2e59d4123bcb3c2098ef0%2Fusers_select.png?alt=media" alt=""><figcaption></figcaption></figure>

2. Click the `DELETE` button in the top right of the user edit dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-f7caae6274918d21185d9cbdfcce7149774ce94d%2Fusers_update_delete.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click the delete button in the dialog.

<figure><img src="https://3008235441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FshLLdPEhD7SHVDYSquU1%2Fuploads%2Fgit-blob-781b56a2f50f07ced03a74e5fac6ef3450ce9561%2Fusers_delete_dialog.png?alt=media" alt=""><figcaption></figcaption></figure>
