Function
verifyWorkspaceMembership
(
userId: string,
workspaceId: string
)
Source from the content-addressed store, hash-verified
| 68 | * @returns Permission type if user has access, null otherwise |
| 69 | */ |
| 70 | export async function verifyWorkspaceMembership( |
| 71 | userId: string, |
| 72 | workspaceId: string |
| 73 | ): Promise<string | null> { |
| 74 | try { |
| 75 | const permission = await getUserEntityPermissions(userId, 'workspace', workspaceId) |
| 76 | |
| 77 | return permission |
| 78 | } catch (error) { |
| 79 | logger.error(`Error verifying workspace permissions for ${userId} in ${workspaceId}:`, error) |
| 80 | return null |
| 81 | } |
| 82 | } |
Tested by
no test coverage detected