Skip to content

Commit 44c4a76

Browse files
committed
fix: align global staff role with backend key
1 parent 68244d7 commit 44c4a76

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/authz-module/components/RenderAdminRole.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import RenderAdminRole from './RenderAdminRole';
66
describe('RenderAdminRole', () => {
77
const adminRole = 'course_admin';
88
const superuserRole = 'django.superuser';
9-
const staffRole = 'django.globalstaff';
9+
const staffRole = 'django.staff';
1010
const instructorRole = 'instructor';
1111
const emptyRole = '';
1212
const mixedCaseAdminRole = 'Library_Admin';

src/authz-module/components/TableCells.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ describe('TableCells Components', () => {
353353
row: {
354354
id: '0',
355355
original: {
356-
role: 'django.globalstaff', org: 'Test Org', scope: 'Test Scope', permissionCount: 1,
356+
role: 'django.staff', org: 'Test Org', scope: 'Test Scope', permissionCount: 1,
357357
},
358358
},
359359
column: { id: 'org' },
@@ -409,7 +409,7 @@ describe('TableCells Components', () => {
409409
row: {
410410
id: '0',
411411
original: {
412-
role: 'django.globalstaff', org: 'Test Org', scope: 'Test Scope', permissionCount: 1,
412+
role: 'django.staff', org: 'Test Org', scope: 'Test Scope', permissionCount: 1,
413413
},
414414
},
415415
column: { id: 'scope' },
@@ -465,7 +465,7 @@ describe('TableCells Components', () => {
465465
row: {
466466
id: '0',
467467
original: {
468-
role: 'django.globalstaff',
468+
role: 'django.staff',
469469
permissionCount: 5,
470470
org: 'Test Org',
471471
scope: 'Test Scope',

src/authz-module/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const MAX_TABLE_FILTERS_APPLIED = 10;
3939

4040
// Role data received from the API uses the dotted format for Django-managed roles.
4141
export const SUPERUSER_ROLE = 'django.superuser';
42-
export const GLOBAL_STAFF_ROLE = 'django.globalstaff';
42+
export const GLOBAL_STAFF_ROLE = 'django.staff';
4343
export const DJANGO_MANAGED_ROLES = [SUPERUSER_ROLE, GLOBAL_STAFF_ROLE];
4444

4545
export const MAP_ROLE_KEY_TO_LABEL: Record<string, string> = {

0 commit comments

Comments
 (0)