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:
co-authored by
Cursor
parent
b25f3cbea0
commit
018f3142ec
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user