mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Handle permission edge cases (empty scopes) (#7723)
This commit is contained in:
@@ -80,6 +80,12 @@ describe('hasScope', () => {
|
||||
global: memberPermissions,
|
||||
}),
|
||||
).toBe(false);
|
||||
|
||||
expect(
|
||||
hasScope([], {
|
||||
global: memberPermissions,
|
||||
}),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
test('should work with allOf mode', () => {
|
||||
@@ -112,5 +118,15 @@ describe('hasScope', () => {
|
||||
{ mode: 'allOf' },
|
||||
),
|
||||
).toBe(false);
|
||||
|
||||
expect(
|
||||
hasScope(
|
||||
[],
|
||||
{
|
||||
global: memberPermissions,
|
||||
},
|
||||
{ mode: 'allOf' },
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user