mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: Return scopes on executions (no-changelog) (#10310)
This commit is contained in:
@@ -30,6 +30,7 @@ describe('ExecutionService', () => {
|
||||
mock(),
|
||||
mock(),
|
||||
mock(),
|
||||
mock(),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -48,6 +48,16 @@ describe('GET /executions', () => {
|
||||
const response2 = await testServer.authAgentFor(member).get('/executions').expect(200);
|
||||
expect(response2.body.data.count).toBe(1);
|
||||
});
|
||||
|
||||
test('should return a scopes array for each execution', async () => {
|
||||
testServer.license.enable('feat:sharing');
|
||||
const workflow = await createWorkflow({}, owner);
|
||||
await shareWorkflowWithUsers(workflow, [member]);
|
||||
await createSuccessfulExecution(workflow);
|
||||
|
||||
const response = await testServer.authAgentFor(member).get('/executions').expect(200);
|
||||
expect(response.body.data.results[0].scopes).toContain('workflow:execute');
|
||||
});
|
||||
});
|
||||
|
||||
describe('GET /executions/:id', () => {
|
||||
|
||||
Reference in New Issue
Block a user