Skip to content

RBAC & Roles ​

Mitch‑Dojo uses permission-based access control, not "is authenticated" gating. Three system roles are built in, and admins can create custom roles with any combination of the 24 fine-grained permissions.

Permission Catalog (24 Permissions) ​

Students (5) ​

Permission KeyDescription
students:viewView student list and student detail pages
students:createCreate students (including CSV import) and work the trial pipeline
students:editEdit students, locations on records, send portal links, record agreement signatures
students:deleteDelete students (removes their photo + attachments)
students:medicalView and edit health & medical information (PHI)

Locations (1) ​

Permission KeyDescription
locations:editCreate, edit, and deactivate dojo locations; rotate check-in tokens

Safety & Incidents (2) ​

Permission KeyDescription
incidents:viewView the accident book and incident reports
incidents:manageLog, edit, close, and delete incident reports

Classes & Schedule (2) ​

Permission KeyDescription
classes:viewView courses, trainers, and the weekly timetable
classes:editCreate/edit courses, trainers, and weekly times; cancel sessions

Attendance (2) ​

Permission KeyDescription
attendance:viewView attendance history and sheets
attendance:markMark attendance and take check-ins

Belts & Gradings (2) ​

Permission KeyDescription
belts:viewView disciplines, ladders, and progression pages
belts:editEdit ladders and record promotions

Memberships & Payments (2) ​

Permission KeyDescription
memberships:viewView plans, enrollments, invoices, and payments
memberships:editManage plans/enrollments and record payments

Analytics (1) ​

Permission KeyDescription
analytics:viewView the analytics dashboard

Communications (1) ​

Permission KeyDescription
communications:editEdit reminder settings and email templates

Administration (5) ​

Permission KeyDescription
audit:viewView the audit log and email log
users:manageCreate, disable, and delete users; change roles
roles:manageCreate, edit, and delete custom roles
settings:manageManage the Admin area (settings, storage, SMTP, retries)
api:manageManage API access (reserved for the Phase 12 REST API)

Profile (1) ​

Permission KeyDescription
profile:viewView and edit own profile, password, and preferences

Default System Roles ​

RolePermissionsWho It's For
Admin24 (all)Full platform control. Locked — cannot be deleted or edited.
Trainer14Floor operations: students (no delete) incl. medical visibility, incidents, classes, attendance, belts, analytics. No administration.
Viewer8Read-only across students, incidents, classes, attendance, belts, memberships, analytics.

System roles are seeded on first run and cannot be deleted.

Custom Roles ​

Admins can create custom roles under Admin → Roles:

  1. Click Create role.
  2. Name the role and write a description.
  3. Select the permissions to grant.
  4. Assign the role to any user.

Use them for profiles like "Office manager" (students + memberships + communication, no belts) or "Committee member" (analytics + views only).

Enforcement ​

Access control is enforced at every layer:

LayerMechanismBehavior
PagesrequirePermission(key)Redirects if denied
Server actionsrequirePermission(key) at the start of every actionRejected if denied
Route handlersPermission check before any work4xx JSON if denied
UI controlshasPermission(...) in JSXControls are hidden, not greyed out
Sidebar & Admin navPermission-filtered navigationSections you can't access don't render
Admin gear buttonShown only with any admin-area permissionHidden entirely for floor-staff roles

Hide, don't disable. A role without a permission simply does not see the control. A Trainer gets a clean floor-operations screen — no write buttons they can't use, no admin nav teasing access they don't have.

Practical Examples ​

ActionAdminTrainerViewer
View studentsYesYesYes
View incidentsYesYesYes
Create/import studentsYesYesNo
Delete studentsYesNoNo
Manage locationsYesNoNo
View scheduleYesYesYes
Edit courses & timesYesNoNo
Mark attendanceYesYesNo
Log/close incident reportsYesYesNo
Record promotionsYesYesNo
Record paymentsYesNoNo
View analyticsYesYesYes
Edit reminder settings/templatesYesNoNo
View audit & email logsYesNoNo
Manage users/roles/settingsYesNoNo
View/edit own profileYesYesYes

Open-source, self-hosted dojo management software.