Skip to main content

Users and Permissions

Mango uses a role-based permission system to control access to data points, data sources, system settings, and UI features. Users represent individuals who use the system, and various privileges can be assigned to grant them the ability to read and alter data and system behavior.

User Levels

There are two fundamental user levels in Mango:

  • Administrators: Users with the superadmin role have full access to all system functionality, including system settings, module management, data source configuration, and all data points.
  • Non-administrator users: These users have access based on their assigned permission roles. They can only view and interact with resources that their roles grant them permission to access.

Every valid user implicitly belongs to the user role. This role is automatically assigned and cannot be removed.

Managing Users

Creating a User

To add a new user, navigate to Administration > Users and click the New button. Configure the following properties:

PropertyDescription
UsernameA unique login identifier for the user.
PasswordThe user's authentication password. Stored using the configured hash algorithm (BCrypt by default).
EmailThe user's email address, used for alarm notifications and test emails.
PhoneOptional phone number for SMS notifications (if configured).
PermissionsComma-delimited list of roles assigned to the user.
MutedWhen enabled, the user does not hear the alarm sound for active alarms.
DisabledWhen enabled, the user cannot log in to the system.
Receive own audit eventsWhen enabled, the user receives email notifications for their own audit trail events (at or above their alarm email level).
Send alarm emailsThe minimum alarm level at which the user receives automatic alarm notification emails. Set to Ignore to disable.

The user editing form showing username, email, permissions, and notification settings

Alarm Email Notifications

Users can have alarm notification emails sent to their email address without being explicitly specified on an email event handler. Setting the Send alarm emails level to anything other than Ignore causes the user to receive event notifications when the event's alarm level is greater than or equal to the configured level. These notifications are sent only when the event is raised (no escalation or inactive notifications). If the user is already specified on an email event handler for the same event, they will not receive duplicate emails.

User Actions

  • Delete: Permanently removes the user from the system.
  • Revert: Resets unsaved changes back to the last saved state.
  • Send Test Email: Sends a test message to the user's configured email address to verify email delivery.
  • Switch To User: When viewing a different user's profile, allows an administrator to log in as that user.

Permission Model

Mango's permission system is based on virtual "groups" (roles). Permissions are specified as comma-delimited lists of role names. A user is granted access to a resource if at least one of their roles matches at least one of the roles in the resource's permission list.

Role names are case-sensitive. The role Operators is different from operators.

Permission Types

Permission TypeDescription
Read permissionAllows the user to view the resource in a non-modifiable way. For data points, this means viewing current and historical values.
Set permissionAllows the user to modify the resource. For data points, this means writing new values to settable points.
Edit permissionAllows the user to change the configuration of the resource (e.g., editing data source settings).

System Permissions

System-level permissions control access to administrative features:

PermissionControls Access To
Data source managementCreating, editing, and deleting data sources.
Event handler managementCreating and configuring event handlers.
Import/exportUsing the JSON import/export functionality.
SQL consoleRunning SQL queries directly against the database.
Module managementInstalling, updating, and removing modules.
System settingsModifying global system configuration.

These permissions are configured on the System Settings page under the Permissions section. Each system permission has a list of roles that are granted access.

Data Point Permissions

Data point permissions control who can read and set individual data points. You can configure permissions on individual data points, or use the Bulk Data Point Edit page to apply permissions to multiple points simultaneously.

  • Read permission: Users with a matching role can view the point's current value, historical data, and statistics.
  • Set permission: Users with a matching role can write values to the point (if the point is settable).

Data Source Permissions

Data source edit permissions can be set on each data source to control which non-administrator users can configure the data source and its points.

Assigning Permissions

Via the Users Page

When editing a user, the Permissions field shows the user's current roles. Click on the dropdown to see a list of roles that other users have but the current user does not. Click a role name to add it to the user. Save the user for the changes to take effect.

Via Bulk Editing

The Bulk Data Point Edit page provides an efficient way to assign read and set permissions to multiple data points at once. Select the points you want to modify, then set the desired permission roles.

Via the Data Source Editor

When editing a data source, you can set edit permissions for the data source and configure default read/set permissions for new data points created under that source.

Via Menu Items and Custom Pages

Permissions can also be applied to menu items and custom pages to control what each user sees in the UI. This allows you to create tailored user experiences where operators only see the dashboards and tools relevant to their role.

Practical Example

Consider a plant with three teams: Operators, Engineers, and Managers.

  1. Create roles: operators, engineers, managers
  2. Assign roles to users based on their team membership
  3. Configure data point permissions:
    • Production points: Read = operators,engineers,managers; Set = operators
    • Configuration points: Read = engineers,managers; Set = engineers
    • Financial data points: Read = managers; Set = (none)
  4. Configure system permissions:
    • Data source management = engineers
    • Event handler management = engineers,managers
    • System settings = (superadmin only)
  5. Configure menu items so operators see only the operations dashboard, engineers see the data source editor, and managers see the reporting pages.

Best Practices

  • Use descriptive role names: Choose role names that clearly describe the group's function (e.g., plant-operators, site-engineers).
  • Apply least privilege: Grant each user only the minimum permissions they need for their job function.
  • Use bulk editing for large deployments: When managing hundreds of data points, bulk permission editing saves significant time.
  • Audit permission changes: Mango's audit trail records permission changes, helping you track who modified access controls and when.
  • Test with a non-admin account: After configuring permissions, log in as a non-administrator user to verify they see only what is intended.

Troubleshooting

ProblemCauseSolution
User cannot access a data sourceThe user's roles do not include any role listed in the data source's read or edit permissionOpen the data source editor, check the Edit permission field, and add one of the user's roles. For read-only access to the data source's points, ensure the individual data points have a Read permission role that matches the user.
User sees blank pages or missing dashboard contentThe user's roles do not match the page-level or menu item permissionsCheck the permissions on the custom page or menu item under Administration > UI Settings. Add the user's role to the visibility permissions for the affected pages.
Cannot create new usersThe logged-in user does not have administrator privilegesOnly users with the superadmin role can create, edit, or delete other user accounts. Log in as an administrator or request that an administrator create the user.
Locked out of the admin accountPassword forgotten or admin account disabledStart Mango in safe mode by adding safeMode=true to mango.properties and restarting. Safe mode resets the admin password to the default and disables authentication restrictions, allowing you to log in and reset credentials. Remove the safeMode property after recovery.
Permission changes not taking effectThe user's browser session is using cached permissionsAsk the user to log out and log back in. Permission changes take effect on the next login, not during an active session.
User can read points but cannot set valuesThe user has read permission but not set permission on the data pointEdit the data point (or use Bulk Data Point Edit) and add the user's role to the Set permission field. The point must also be configured as settable on the data source side.