Permission
The Permission entity, mapped to the permission table.
| Table | permission |
| Tenant-scoped | No — global table |
| Columns | 4 |
| Relationships | 0 |
| Source | backend/src/main/java/com/motorph/payroll/model/Permission.java |
Not tenant-scoped
This entity does not extend TenantOwned, so its rows are shared across every tenant. TenantCoverageTest allows that only for tables deliberately declared global.
Columns
| Field | Type | Column | Null | Notes |
|---|---|---|---|---|
permissionId | Integer | permission_id | — | primary key, generated |
permissionName | String | permission_name | — | unique |
description | String | description | Yes | — |
category | String | category | Yes | — |
Referenced by
| Entity | Field | Kind |
|---|---|---|
| Role | permissions | @ManyToMany |
Neighbourhood
Repository
PermissionRepository
Declared over Permission with id type Integer. Source: backend/src/main/java/com/motorph/payroll/repository/PermissionRepository.java
| Method | Returns | Notes |
|---|---|---|
existsByPermissionNameIgnoreCase(String permissionName) | boolean | derived |
existsByPermissionNameIgnoreCaseAndPermissionIdNot(String permissionName, Integer permissionId) | boolean | derived |
Reached by
These controllers hold — directly or through a service they depend on — a repository over Permission.
| Controller | Base path | Endpoints | Module |
|---|---|---|---|
| PermissionController | /api/permissions | 5 | Auth & Identity |
| PublicSignupController | /api/public/signup | 2 | Billing & Platform |
| RoleController | /api/roles | 6 | Auth & Identity |
| TenantAdminController | /api/admin/tenants | 7 | Billing & Platform |
Generated page
This page is rebuilt from the source on every docs build by docs-site/scripts/gen-code-wiki.mjs. Editing it has no effect — change the code, or, if what you want to say is prose, write it in docs/.