Work / DwarSeva Societies / Wiki / Entities
roles
Entitycanonicalverified 2026-10-04
ROLE.SOCIETY-MEMBERSummary
A person's role in a society decides which mobile app they see; their role in a unit says how they are attached to a flat.
Canonical values
| Key | Value | Last changed |
|---|---|---|
| SOCIETY-ROLE.ENUM | SUPER_ADMIN, SOCIETY_ADMIN, SECURITY_HEAD, SECURITY_GUARD, RESIDENT, STAFF |
2026-10-04 |
| UNIT-ROLE.ENUM | OWNER, TENANT, FAMILY_MEMBER, MAINTENANCE_STAFF |
2026-10-04 |
| LABEL.SUPER_ADMIN | Super Admin | 2026-10-04 |
| LABEL.SOCIETY_ADMIN | Society Admin | 2026-10-04 |
| LABEL.SECURITY_HEAD | Security Head | 2026-10-04 |
| LABEL.SECURITY_GUARD | Security Guard | 2026-10-04 |
| LABEL.RESIDENT | Resident | 2026-10-04 |
| APP.ADMIN-TABS | SUPER_ADMIN, SOCIETY_ADMIN, or isSuperAdmin |
2026-10-04 |
| APP.GUARD-TABS | SECURITY_GUARD (and SECURITY_HEAD at the gate, refused by the layout) |
2026-10-04 |
| APP.RESIDENT-TABS | everything else | 2026-10-04 |
| CONSOLE.ACCESS | any signed-in user — AuthGuard checks sign-in, not role |
2026-10-04 |
Drift, recorded not fixed.
apps/mobile/src/lib/enums.tstypesROLE_LABELasRecord<SocietyMemberRole, …>and listsTENANT,FAMILY_MEMBERandMAINTENANCE_STAFF, which the schema puts inUnitMemberRole; it has noSTAFF. Either the generated type is stale or the map does not compile against the current schema.- The console's member filter offers
ADMIN,RESIDENT,GUARD,MAINTENANCE,SECURITY; its role badge knowsADMIN,GUARD,SECRETARY,TREASURER,PRESIDENT,VICE_PRESIDENT. OnlyRESIDENTexists in the schema. - Seed scenario
06_all_member_roles.jsondescribes eight society roles, the schema has six.
Related
- role-gate — how a role becomes an app
- membership
- admin-society-members
Sources
- packages/db/prisma/schema.prisma
- apps/mobile/src/lib/enums.ts
- apps/mobile/src/app/index.tsx
- apps/admin/src/features/societies/SocietyMembersPage.tsx
- apps/admin/src/components/ui/StatusBadge.tsx