Skip to content

Roles and Permissions

MyEmailVault uses role-based access control (RBAC) with custom roles. Each role contains a set of policy statements that define exactly what a user with that role can do.

How It Works

Each role consists of one or more CASL policy statements. A policy statement is a pair of:

  • Action -- What the user is allowed to do.
  • Subject -- What resource the action applies to.

A user's effective permissions are the union of all policy statements in their assigned role.

Available Actions

ActionDescription
readView a resource
createCreate a new resource
updateModify an existing resource
deleteRemove a resource
syncTrigger a synchronization operation
searchSearch within a resource
manageFull access (includes all actions)

Available Subjects

SubjectDescription
archiveArchived emails
ingestionEmail ingestion sources
usersUser accounts
rolesRole definitions
audit-logAudit log entries
dashboardDashboard and analytics
settingsSystem settings
allAll resources (wildcard)

Special Values

  • The manage action grants every possible action on the specified subject.
  • The all subject applies the action to every resource in the system.
  • Combining manage + all grants unrestricted access to the entire platform.

Creating a Custom Role

  1. Go to Settings > Roles.
  2. Click Create Role.
  3. Enter a name for the role.
  4. Add one or more policy statements by selecting an action and a subject for each.
  5. Save the role.

Assigning Roles to Users

Roles are assigned when creating or editing a user account in Settings > Users. Each user has exactly one role.

Example Roles

Super Admin

ActionSubject
manageall

Full, unrestricted access to every feature and resource.

Auditor

ActionSubject
readarchive
readaudit-log
searcharchive

Read-only access to the archive and audit log, with the ability to search archived emails. No access to settings, user management, or ingestion.