Skip to content

Commit 9aee1e4

Browse files
committed
fix: update validation request body and getTeamMembers response
1 parent a2e33d4 commit 9aee1e4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/authz-module/data/hooks.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jest.mock('@edx/frontend-platform/auth', () => ({
1010

1111
const mockMembers = [
1212
{
13-
displayName: 'Alice',
13+
fullName: 'Alice',
1414
username: 'user1',
1515
1616
roles: ['admin', 'author'],
1717
},
1818
{
19-
displayName: 'Bob',
19+
fullName: 'Bob',
2020
username: 'user2',
2121
2222
roles: ['collaborator'],

src/authz-module/libraries-manager/context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { usePermissionsByRole } from '@src/authz-module/data/hooks';
88
import { PermissionMetadata, ResourceMetadata, Role } from 'types';
99
import { libraryPermissions, libraryResourceTypes, libraryRolesMetadata } from './constants';
1010

11-
const LIBRARY_TEAM_PERMISSIONS = ['act:view_library_team', 'act:manage_library_team'];
11+
const LIBRARY_TEAM_PERMISSIONS = ['view_library_team', 'manage_library_team'];
1212
const LIBRARY_AUTHZ_SCOPE = 'lib:*';
1313

1414
export type AppContextType = {
@@ -41,7 +41,7 @@ export const LibraryAuthZProvider: React.FC<AuthZProviderProps> = ({ children }:
4141
if (!libraryId) {
4242
throw new Error('MissingLibrary');
4343
}
44-
const permissions = LIBRARY_TEAM_PERMISSIONS.map(action => ({ action, object: libraryId }));
44+
const permissions = LIBRARY_TEAM_PERMISSIONS.map(action => ({ action, scope: libraryId }));
4545

4646
const { data: userPermissions } = useValidateUserPermissions(permissions);
4747
const [{ allowed: canViewTeam }, { allowed: canManageTeam }] = userPermissions;

0 commit comments

Comments
 (0)