We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d20d074 commit 911341cCopy full SHA for 911341c
src/utils/permission.ts
@@ -4,6 +4,6 @@ import { GetSessionApiResponse } from 'redux/otomiApi'
4
export function canDo(user: GetSessionApiResponse['user'], teamId: string, action: string): boolean {
5
if (user.isPlatformAdmin) return true
6
if (!teamId) return false
7
- const deniedActions = get(user, `authz.${teamId}.deniedAttributes.access`, [])
+ const deniedActions = get(user, `authz.${teamId}.deniedAttributes.teamMembers`, [])
8
return !deniedActions.includes(action)
9
}
0 commit comments