メインコンテンツまでスキップ

Roles & Permissions

Your Quality Assurance director needs read-only access to audit findings across all sites, your Production managers need to escalate actions during TIER meetings, and your Maintenance team leaders need to enter KPIs but not modify board structures. ProBeya's multi-role RBAC system is designed for exactly this: pharma organizational hierarchies where one person often wears multiple hats.

Architecture Overview​

ProBeya uses a multi-role RBAC system with 13 predefined roles organized into five categories. Each user can hold multiple roles simultaneously -- the effective permissions are the union of all assigned roles. The system evaluates the most privileged role via checkMultiRolePermission, ensuring cross-functional users get the access they need without over-provisioning.

Role Hierarchy​

Roles are organized with a numeric hierarchy level (lower number = more privileged). A user can only assign or modify roles below their own hierarchy level. This prevents privilege escalation -- a team_leader (level 40) cannot promote someone to tenant_admin (level 5).

Administration Roles​

RoleLevelPharma ContextPermissions Summary
org_owner0CIO / VP ITAll 23 permissions. Billing, deletion, ownership transfer. One per org.
tenant_admin5IT Director / System AdministratorAll permissions except billing. Members, SSO, settings, templates.
site_admin10Site IT Lead / Local AdministratorOperational permissions + site settings. No billing, no member management at org level.

Operational Excellence Roles​

RoleLevelPharma ContextPermissions Summary
opex_coordinator20OpEx Director / Lean Six Sigma LeadKPIs, templates, analytics, boards, escalation, action verification.
department_manager30Production Manager / Engineering ManagerBoards, actions, escalation, verification, resource management.
team_leader40Shift Supervisor / Line ManagerItems, KPIs, basic actions, escalation, analytics.

Project Management Roles​

RoleLevelPharma ContextPermissions Summary
pmo_manager20Head of PMOTemplates, analytics, projects, portfolio, resources, gate approvals.
portfolio_manager30Portfolio DirectorAnalytics, projects, portfolio management, gate approvals.
project_manager40Project Manager / Tech Transfer LeadBoards, items, KPIs, actions, analytics, project management.
sponsor50Executive Sponsor / VP R&DAnalytics and gate approvals (read-heavy, decision-oriented).

Quality & Access Roles​

RoleLevelPharma ContextPermissions Summary
quality_manager30QA Manager / Compliance OfficerItems, KPIs, actions, verification, analytics, document control.
team_member60Operator / Technician / AnalystCreate/edit items, enter KPIs, create/edit actions.
guest70External Auditor / ConsultantAnalytics view only. No create, edit, or delete permissions.

Segregation of Duties for GxP​

In regulated environments, segregation of duties (SoD) is a critical control. ProBeya's role structure supports the following GxP-relevant separations:

SoD RequirementEnforced ByRegulatory Reference
Action creator cannot verify their own actionverify_action permission excluded from team_member role21 CFR Part 11.10(k)
Billing management separated from operational accessmanage_billing restricted to org_owner onlySOC 2 CC6.1
Template management separated from daily usemanage_templates restricted to admin + opex_coordinator + pmo_managerGAMP 5 Category 4
Gate approval separated from project executionapprove_gates restricted to pmo_manager, portfolio_manager, sponsorPMI Stage-Gate methodology
Member management separated from document controlmanage_members restricted to admin roles (level <= 10)21 CFR Part 11.10(d)
Compliance Note

For validated systems, document your role assignments in the User Requirements Specification (URS) and verify them during Installation Qualification (IQ). The permission matrix below should be referenced in your CSV validation protocol.

Multi-Role Assignment​

Users can hold multiple roles simultaneously via the roles[] array on the membership record. The system evaluates the union of all assigned roles' permission sets using getEffectivePermissions().

Example: A site Quality Manager who also leads tech transfer projects:

  • Roles: quality_manager + project_manager
  • Effective permissions: document control + project management + action verification + analytics

The role categories in the UI are grouped as follows during assignment:

  • Administration -- tenant_admin, site_admin
  • Operational Excellence -- opex_coordinator, department_manager, team_leader
  • Project Management -- project_manager, portfolio_manager, pmo_manager, sponsor
  • Quality -- quality_manager
  • Access -- team_member, guest
警告

The org_owner role cannot be assigned through the standard invitation flow. Ownership is set during organization creation and can only be transferred by the current owner via Settings > Organization > Danger Zone.

Full Permissions Matrix (23 Permissions)​

Board & Item Operations​

Permissionorg_ownertenant_adminsite_adminopex_coorddept_mgrteam_leaderproj_mgrquality_mgrteam_memberguest
create_boardYesYesYesYesYes--Yes------
edit_boardYesYesYesYesYes--Yes------
delete_boardYesYesYes--------------
create_itemYesYesYesYesYesYesYesYesYes--
edit_itemYesYesYesYesYesYesYesYesYes--
delete_itemYesYesYes--------------

KPI & Action Operations​

Permissionorg_ownertenant_adminsite_adminopex_coorddept_mgrteam_leaderproj_mgrquality_mgrteam_memberguest
edit_kpiYesYesYesYesYesYesYesYesYes--
delete_kpiYesYesYesYes------------
create_actionYesYesYesYesYesYesYesYesYes--
edit_actionYesYesYesYesYesYesYesYesYes--
escalateYesYesYesYesYesYesYes------
verify_actionYesYesYesYesYes----Yes----

Administration & Analytics​

Permissionorg_ownertenant_adminsite_adminopex_coorddept_mgrpmo_mgrsponsorquality_mgrteam_memberguest
manage_templatesYesYesYesYes--Yes--------
manage_membersYesYes----------------
manage_automationsYesYesYes--------------
manage_billingYes------------------
manage_settingsYesYesYes--------------
view_analyticsYesYesYesYesYesYesYesYes--Yes

PPM Operations​

Permissionorg_ownertenant_adminsite_adminpmo_mgrportfolio_mgrproj_mgrsponsordept_mgr
manage_projectsYesYesYesYesYesYes----
manage_portfolioYesYes--YesYes------
manage_resourcesYesYesYesYes------Yes
approve_gatesYesYes--YesYes--Yes--
manage_documentsYesYesYes----------

Permission Enforcement​

Permission checks are enforced server-side in the tRPC layer using createRoleProtectedProcedure. Key enforcement points:

Permission TokenRequired Role LevelUsed By
manage_settingsAdmin (level <= 10)Organization settings, API keys, SSO, webhooks
manage_membersAdmin (level <= 10)Inviting, role changes, removal
manage_billingOwner (level 0)Plan changes, payment methods

The canAssignRole function verifies that the caller's highest role level is numerically lower (more privileged) than the role they are trying to assign. The canModifyMember function applies the same check when changing or removing an existing member.

Custom Roles (Enterprise)​

Enterprise plan customers can create custom roles with granular permissions:

  1. Navigate to Settings > Roles.
  2. Click + Create Role.
  3. Enter a role name, hierarchy level, and description.
  4. Toggle individual permissions from the 23-permission set.
  5. Click Save.

Custom roles integrate with the same enforcement engine as built-in roles. They can be assigned at both organization and workspace levels.

Workspace-Level Roles​

Workspace-level roles override organization roles for a specific workspace, enabling fine-grained access control:

RoleDescriptionPharma Use Case
Workspace AdminFull control within the workspaceSite OpEx coordinator managing a single site workspace
Workspace MemberCreate and edit contentProduction operators entering daily data
Workspace ViewerRead-only accessCross-site auditors reviewing another site's boards

Enterprise Role Design Patterns​

Pattern 1: Multi-Site Pharma with Central PMO​

org_owner → CIO (1 person)
tenant_admin → IT Directors (2-3 people)
site_admin → Site IT Leads (1 per site)
pmo_manager → Head of PMO
opex_coordinator → OpEx Directors (1 per site)
department_manager → Production/Engineering/QC Managers
quality_manager → QA Managers
team_leader → Shift Supervisors
project_manager → Tech Transfer / Capital Project Leads
team_member → Operators, Technicians, Analysts
guest → External Auditors, Consultants

Pattern 2: Contract Manufacturing Organization (CMO)​

org_owner → COO
tenant_admin → Operations Director
site_admin → Site Managers
quality_manager → Client QA Representatives (per-client workspace)
team_leader → Line Supervisors
team_member → Operators
guest → Client Auditors (workspace-scoped)

Recovery Procedures​

ScenarioResolution
Admin accidentally removed from orgorg_owner re-invites with the appropriate role(s)
Privilege escalation detectedReview audit log, revoke excess roles, file a deviation report
User needs temporary elevated accessAssign additional role, set a calendar reminder to remove it, document in change control
Role assignment blocked ("insufficient privilege")A higher-level admin must perform the assignment

Best Practices​

  • Follow the principle of least privilege -- assign the minimum role needed for each person's responsibilities.
  • Use multi-role assignment for cross-functional access instead of over-provisioning a single high-privilege role.
  • Conduct quarterly access reviews in Settings > Members to verify role assignments remain appropriate.
  • Use the Audit Log to monitor all role assignment changes.
  • Document role-to-job-function mappings in your CSV User Requirements Specification.