chore(core): Use roles from database in global roles (#17853)

This commit is contained in:
Andreas Fitzek
2025-08-22 16:02:01 +02:00
committed by GitHub
parent 350f84c49f
commit a8e4387f4d
117 changed files with 875 additions and 410 deletions

View File

@@ -222,7 +222,7 @@ describe('Public API endpoints with feat:apiKeyScopes enabled', () => {
expect(returnedUser.id).toBe(storedUser.id);
expect(returnedUser.email).toBe(storedUser.email);
expect(returnedUser.email).toBe(payloadUser.email);
expect(storedUser.role).toBe(payloadUser.role);
expect(storedUser.role.slug).toBe(payloadUser.role);
});
test('should fail to create user when API key doesn\'t have "user:create" scope', async () => {
@@ -267,7 +267,7 @@ describe('Public API endpoints with feat:apiKeyScopes enabled', () => {
*/
expect(response.status).toBe(204);
const storedUser = await getUserById(member.id);
expect(storedUser.role).toBe(payload.newRoleName);
expect(storedUser.role.slug).toBe(payload.newRoleName);
});
test('should fail to change role when API key doesn\'t have "user:changeRole" scope', async () => {