Skip to main content

Configure Roles

The role system is a vital component of the Drivers Hub, governing user permissions. A well-configured role system ensures security, prevents unauthorized actions, and allows specific staff members to complete their tasks. Roles also represent the positions users hold, such as "Leadership", "Human Resources Team", and "Driver", and are grouped and displayed in the Members tab.

To create a role, navigate to Configuration - Roles, click +, and complete the input form.
*Name and Order ID are required fields while the others are all optional.

Role Creation

For your convenience, we provide a list of default roles which may be used to start up your Drivers Hub. You may simply click the overwrite button to import them. Note that you still have to save and reload the config for changes to take effect.

Attributes

  • Name: A string describing the role, e.g., "Leadership", "Human Resources Team".
  • ID: Automatically assigned unique identifier. Editable only in the JSON editor. Changing the ID requires removing the role from all users and re-adding it when the new configuration is active. The role ID in perms must also be updated to maintain permissions.
  • Permissions: Selectable permissions from a dropdown list of built-in permissions. Additional permissions may be created by typing the key (all lowercase, using _ to connect words), e.g., permission_of_external_application. The client currently uses a gallery permission not built into the server.
  • Order ID: The role's order, where a smaller value means a higher role. Negative values are accepted. Users with Manage Roles permission can only add/remove roles lower than or equal to their highest role to/from other users. For instance, a user with the highest role's order ID as 10 cannot add a role with an order ID of 5 or 10 to other users.
  • Display Order ID: Display order of the role in the Members tab. A smaller value means higher in the list, with -1 reserved for hiding the role in the tab.
  • Color: Controls the role color in users' profiles. Administrator of Drivers Hubs under the Special Guest subscription can configure users' name colors to match their highest role's color.
  • Discord Role ID: When specified, the Discord Role is added/removed to/from the user in Discord along with the Drivers Hub role. The user must have connected their Discord account in Drivers Hub.

Notes

  1. You can create unlimited roles in Drivers Hubs operated by The Drivers Hub Project (CHub). However, it's not recommended to create too many roles to avoid performance degradation.
  2. The up and down arrows on the right control the role's order in the configuration tab and do not affect the Order ID of the roles.
  3. The ID of roles must be unique, while the Order ID / Display Order ID may be duplicated.
  4. After configuring roles, remember to save and reload the configuration. To reflect changes in your client, go to Settings, click Clear Cache, wait 30 seconds, and reload the current tab.