# Users and permissions

# Users

# Overview

Users are the core of the ERP system. All non-system actions and tasks are performed by users with proper permissions.

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-05/scaled-1680-/3oGimage.png)

# Create a new user

<p class="callout danger">This action requires the **"Create user"** permission.</p>

To create a new user, click the "**+**" button in the top right corner above the table. You will be redirected to the "[Add new user](https://placeholder.erp/users/create)" form.

To create a new user, you need at least:

- A **unique email address** that is not yet assigned to any user.
- The user's **first name** and **last name.**
- The user **must be confirmed** in order to be able to access the ERP.

![output.gif](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-05/QfRoutput.gif)

# Update an existing user

<p class="callout danger">This action requires the **"Update users"** permission.</p>

Updating the user is done by finding the user in the "[Users](https://placeholder.erp/users)" table and its clicking "Edit" icon.

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/xr6image.png)

This redirects you to the user's edit page, where you can update most of the user's basic information (photo, name, address, authorization, contact information...) or send a **"Password reset"** email to user.

[![output.gif](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/Yxyoutput.gif)](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/Yxyoutput.gif)

# Delete user(s)

<p class="callout danger">This action requires the **"Delete users"** permission.</p>

# Roles

# Overview

Roles are used in the ERP system to determine user's role in the company.

<p class="callout info">Roles are used to group sets of permissions, that are required for performing a task or general ERP use.</p>

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/mlfimage.png)

# Create a new role

To create a new role, click the "**+**" button above the "[Roles](https://placeholder.erp/roles)" table, to navigate to the "[Create new authorization role](https://placeholder.erp/roles/create)" form.

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/IPqimage.png)

On the form, fill out the required fields and click save to add a new role.

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/ZrYimage.png)

- **Name**
    - Select a descriptive name for the role (eg. a work position, like **Department Lead**)

- **Slug**
    - Is used to identify the role throughout the ERP. Is usually formatted role name (eg. **department-lead**)

- **Level**
    - A role's level is used to determine it's priority over other roles. Roles with higher priority overrule roles with lower levels.

- **Description**
    - Is not required, but it's highly encouraged that it be added. Used to further explain the roles purpose.

- **Permissions**
    - Select, which permissions are attached to this role.

- **Users**
- - You can list users, that will have this role here, and it will be assigned to them automatically after role is created.

# Update an existing role

<p class="callout danger">Roles should be updated only be people, who know their purpose, as deleting a role that is required for a certain tasks will stop users form performing those tasks.</p>

To edit an existing role, find it in the roles table and click on its **"Edit"** button.

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/Z6yimage.png)

On the role's page, you can update its name and description, its assigned permissions and manage users, that have this role.

<p class="callout danger">It is not recommended to update a role's slug, as it may be used for programmatic access control.</p>

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/tYkimage.png)

# Delete role(s)

<p class="callout danger">Roles should only be deleted by people, who understand the role's purpose and know it's uses.</p>

To delete a role, find it in the "[Roles](https://placeholder.erp/roles)" table and tick its checkbox. Then click and confirm the **"Trash"** button, that appears above the table.

[![output.gif](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/AUeoutput.gif)](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/AUeoutput.gif)

# Permissions

# Overview

Permissions are used to limit and provide access for users within the ERP system.

<p class="callout info">**TIP:** Permissions can be assigned onto roles or onto users directly, although this is <span data-dobid="hdw">discouraged, as roles provide easier trackability of what user has what permissions.</span><span data-dobid="hdw">.</span></p>

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-05/scaled-1680-/rR7image.png)

š

# Create a new permission

To create a new permission, navigate to the "Add new authorization permission" form by clicking the "+" button in the top right above the table or by visiting the "[Add new permission form](https://placeholder.erp/permissions/create)" directly.

[![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/aCjimage.png)](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/aCjimage.png)

When creating a new permission, a unique name is required, alongside a <span aria-level="1" class="yKMVIe" role="heading">corresponding</span> permission slug. The slug is how the permission will be called during checks.

[![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-05/scaled-1680-/yr7image.png)](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-05/yr7image.png)

Defining the group that the permission belongs to, is not necessary but is encouraged, as it makes it easier to find the new permission while searching for it.

<p class="callout info">**TIP:** Description is not strictly required, but should be added when possible, to describe what the permission is used for.</p>

# Update an existing permission

<p class="callout danger">Permissions should be updated only be people, who know their purpose, as permissions are used to grant access to a parts of the ERP .</p>

To edit an existing permission, find it in the permissions table and click on its **"Edit"** button.

[![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/yxdimage.png)](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/yxdimage.png)

On the permission's page, you can update its name, description and group, that's used to show grouped permissions in permissions section on user and role page.

<p class="callout danger">It is not recommended to update a permission's slug, as it may be used for programmatic access control.</p>

![image.png](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/scaled-1680-/ddeimage.png)

# Delete permission(s)

<p class="callout danger">Permissions should only be deleted by people, who understand their purpose and know the permission's uses.</p>

To delete a permission, find it in the "[Permissions](https://placeholder.erp/permissions)" table and tick its checkbox. Then click and confirm the **"Trash"** button, that appears above the table.

![output.gif](https://how-to-erp.dewesoft.com/uploads/images/gallery/2024-06/gleoutput.gif)