mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
chore(core): Use roles from database in global roles (#17853)
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user