Show Roll Call to every staff role, including editors.

Owners, admins, editors, and viewers can open it when the business module is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-10 12:33:57 +03:30
co-authored by Cursor
parent b25f3cbea0
commit 018f3142ec
2 changed files with 4 additions and 11 deletions
+2 -5
View File
@@ -9,16 +9,13 @@ function membershipAllowsRollCall(membership: {
teamRole: string | null
permissions: string[]
}): boolean {
if (membership.isOwner) return true
if (membership.teamRole === 'admin' || membership.teamRole === 'business_owner') {
return true
}
if (membership.isOwner || membership.teamRole) return true
return membership.permissions.includes('roll_calls.read')
}
/**
* Show Roll Call when the business module is enabled and the user is
* staff (owner / admin) for the active tenant.
* staff for the active tenant (owner, admin, editor, or viewer).
*/
export function canAccessRollCall(
user: AuthUser | null | undefined,