✨ Features

Custom Roles & Permissions

Define custom roles with granular permission control.

Default Roles

RoleAccess Level
SUPER_ADMINFull system access
ADMINOrganization management
MANAGERTeam management
EMPLOYEESelf-service access
CANDIDATELimited application view
VIEWERRead-only access

Creating Custom Roles

  1. Go to Settings → Roles & Permissions
  2. Click Add Role
  3. Enter role name
  4. Select permissions from categories

Permission Categories

CategoryExamples
OrganizationView org, edit org, manage teams
EmployeeView employees, edit, delete
Time TrackingView time, approve timesheets
ProjectsCreate, edit, delete projects
TasksCreate, assign, manage status
FinancialView invoices, create, approve
ReportsView reports, export data
AdminManage roles, integrations

Permission Enforcement

Permissions are enforced at multiple layers:

Diagram; its source is available below
Diagram source
graph LR
    Request --> Guard[Permission Guard]
    Guard -->|Check| RoleService
    RoleService --> DB[(Role-Permission Table)]
    Guard -->|Allowed| Controller
    Guard -->|Denied| 403[403 Forbidden]

Guard-Based

@UseGuards(PermissionGuard)
@Permissions(PermissionsEnum.ORG_EMPLOYEES_EDIT)
@Put(':id')
async update(@Param('id') id: string, @Body() dto: UpdateDTO) {
  return this.service.update(id, dto);
}

API

GET /api/role
POST /api/role
GET /api/role/:id/permissions
PUT /api/role/:id/permissions

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey