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

This commit is contained in:
Andreas Fitzek
2025-08-26 17:53:46 +02:00
committed by GitHub
parent cff3f4a67e
commit ecad12b77a
117 changed files with 956 additions and 424 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 () => {