Fix: remove admin.logentry perm, use admin (staff) status (#6380)

This commit is contained in:
shamoon
2024-04-13 17:35:34 -07:00
committed by GitHub
parent 47b4a602a7
commit f812f2af4d
15 changed files with 81 additions and 47 deletions

View File

@@ -418,4 +418,25 @@ describe('PermissionsService', () => {
)
).toBeTruthy()
})
it('correctly checks admin status', () => {
permissionsService.initialize([], {
username: 'testuser',
last_name: 'User',
first_name: 'Test',
id: 1,
is_staff: true,
})
expect(permissionsService.isAdmin()).toBeTruthy()
permissionsService.initialize([], {
username: 'testuser',
last_name: 'User',
first_name: 'Test',
id: 1,
})
expect(permissionsService.isAdmin()).toBeFalsy()
})
})