Add moderation permissions and durable player records

This commit is contained in:
2026-10-15 21:06:08 -04:00
parent c1758cce25
commit c91d49c298
17 changed files with 699 additions and 21 deletions
+13 -6
View File
@@ -45,12 +45,15 @@ describe('administrator pages', () => {
expect(body).not.toContain('You do not have access');
});
it.each(['viewer', 'operator'] as const)('keeps user accounts unavailable to %s', (role) => {
asRole(role);
const body = render(UsersPage).body;
expect(body).toContain('You do not have access');
expect(body).not.toContain('Account activity');
});
it.each(['viewer', 'operator', 'moderator'] as const)(
'keeps user accounts unavailable to %s',
(role) => {
asRole(role);
const body = render(UsersPage).body;
expect(body).toContain('You do not have access');
expect(body).not.toContain('Account activity');
}
);
it('retains administrator user creation and describes the assignable Super Viewer role', () => {
asRole('admin');
@@ -58,6 +61,10 @@ describe('administrator pages', () => {
expect(body).toContain('Add user');
expect(body).toContain('Super Viewer');
expect(body).toContain('Read all fleet and administrator pages without making changes.');
expect(body).toContain('Moderator');
expect(body).toContain(
'Moderate players with server or game restrictions lasting up to 7 days.'
);
});
it('keeps key searches available while hiding key creation from Super Viewers', () => {