Roles & Permissions

Role hierarchy, permission matrix, and granular permission-based access control in MQUAD

MQUAD uses a sophisticated Permission-based Access Control system. While users are assigned roles for convenience, their actual capabilities are determined by a list of granular permission strings.

Technical Implementation

Unlike traditional role systems that rely on boolean flags (like is_admin), MQUAD checks for specific permission identifies in the user's session:

  • super:admin — Global platform control.
  • host:manage_tenants — Ability to create and manage workspaces.
  • full:access — Unrestricted access within a tenant.

Role Hierarchy

The following roles provide sets of permissions for common tasks:

RoleScopeDescription
Super AdminGlobalFull platform access. Identified by the super:admin permission.
Host AdminGlobalWorkspace management. Identified by the host:manage_tenants permission.
Workspace AdminTenantFull control within a single workspace.
Survey AdminTenantFull control over specific assigned surveys.
Survey EditorTenantCan modify survey content and responses but cannot publish or delete.
MemberTenantStandard user who can create surveys and view data.
GuestTenantRead-only access to specific surveys or dashboards.

Default Permission Matrix

Permission StringSuper AdminHost AdminWorkspace AdminMember
super:admin✓---
host:manage_tenants✓✓--
tenant:manage_settings✓✓✓-
survey:create✓✓✓✓
user:manage✓✓✓-
data:export✓✓✓✓

Assigning Permissions

Permissions are assigned via the User Management screen. When a role is selected, the corresponding permission set is automatically applied to the user's profile.

Custom Roles & Permissions

Advanced users can create custom roles that pick and choose individual permissions. This is useful for roles like "Data Auditor" or "Field Supervisor" who need specific access without full administrative rights.

  1. Navigate to Admin > Roles.
  2. Click Create Role.
  3. Select the required permissions from the comprehensive list.
  4. Assign the new role to any user.

Changes to permissions take effect immediately upon the next user action or session refresh.