diff --git a/src/authz-module/data/hooks.test.tsx b/src/authz-module/data/hooks.test.tsx index 7d1cdcc..c8fb969 100644 --- a/src/authz-module/data/hooks.test.tsx +++ b/src/authz-module/data/hooks.test.tsx @@ -10,13 +10,13 @@ jest.mock('@edx/frontend-platform/auth', () => ({ const mockMembers = [ { - displayName: 'Alice', + fullName: 'Alice', username: 'user1', email: 'alice@example.com', roles: ['admin', 'author'], }, { - displayName: 'Bob', + fullName: 'Bob', username: 'user2', email: 'bob@example.com', roles: ['collaborator'], diff --git a/src/authz-module/libraries-manager/context.tsx b/src/authz-module/libraries-manager/context.tsx index 5c8e2c7..e9c8905 100644 --- a/src/authz-module/libraries-manager/context.tsx +++ b/src/authz-module/libraries-manager/context.tsx @@ -8,7 +8,7 @@ import { usePermissionsByRole } from '@src/authz-module/data/hooks'; import { PermissionMetadata, ResourceMetadata, Role } from 'types'; import { libraryPermissions, libraryResourceTypes, libraryRolesMetadata } from './constants'; -const LIBRARY_TEAM_PERMISSIONS = ['act:view_library_team', 'act:manage_library_team']; +const LIBRARY_TEAM_PERMISSIONS = ['view_library_team', 'manage_library_team']; const LIBRARY_AUTHZ_SCOPE = 'lib:*'; export type AppContextType = { @@ -41,7 +41,7 @@ export const LibraryAuthZProvider: React.FC = ({ children }: if (!libraryId) { throw new Error('MissingLibrary'); } - const permissions = LIBRARY_TEAM_PERMISSIONS.map(action => ({ action, object: libraryId })); + const permissions = LIBRARY_TEAM_PERMISSIONS.map(action => ({ action, scope: libraryId })); const { data: userPermissions } = useValidateUserPermissions(permissions); const [{ allowed: canViewTeam }, { allowed: canManageTeam }] = userPermissions;