Skip to content

Work / DwarSeva / Wiki / Entities

roles

Entitycanonicalverified 2026-10-04

ROLE.SOCIETY-MEMBER

Summary

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.ts types ROLE_LABEL as Record<SocietyMemberRole, …> and lists TENANT, FAMILY_MEMBER and MAINTENANCE_STAFF, which the schema puts in UnitMemberRole; it has no STAFF. 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 knows ADMIN, GUARD, SECRETARY, TREASURER, PRESIDENT, VICE_PRESIDENT. Only RESIDENT exists in the schema.
  • Seed scenario 06_all_member_roles.json describes eight society roles, the schema has six.

Related

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