mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat: RBAC (#8922)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: Val <68596159+valya@users.noreply.github.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Valya Bullions <valya@n8n.io> Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: Danny Martini <despair.blue@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com> Co-authored-by: oleg <me@olegivaniv.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com> Co-authored-by: Elias Meire <elias@meire.dev> Co-authored-by: Giulio Andreini <andreini@netseven.it> Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Ayato Hayashi <go12limchangyong@gmail.com>
This commit is contained in:
@@ -65,7 +65,7 @@ Cypress.Commands.add('signout', () => {
|
||||
cy.request({
|
||||
method: 'POST',
|
||||
url: `${BACKEND_BASE_URL}/rest/logout`,
|
||||
headers: { 'browser-id': localStorage.getItem('n8n-browserId') }
|
||||
headers: { 'browser-id': localStorage.getItem('n8n-browserId') },
|
||||
});
|
||||
cy.getCookie(N8N_AUTH_COOKIE).should('not.exist');
|
||||
});
|
||||
@@ -80,12 +80,19 @@ const setFeature = (feature: string, enabled: boolean) =>
|
||||
enabled,
|
||||
});
|
||||
|
||||
const setQuota = (feature: string, value: number) =>
|
||||
cy.request('PATCH', `${BACKEND_BASE_URL}/rest/e2e/quota`, {
|
||||
feature: `quota:${feature}`,
|
||||
value,
|
||||
});
|
||||
|
||||
const setQueueMode = (enabled: boolean) =>
|
||||
cy.request('PATCH', `${BACKEND_BASE_URL}/rest/e2e/queue-mode`, {
|
||||
enabled,
|
||||
});
|
||||
|
||||
Cypress.Commands.add('enableFeature', (feature: string) => setFeature(feature, true));
|
||||
Cypress.Commands.add('changeQuota', (feature: string, value: number) => setQuota(feature, value));
|
||||
Cypress.Commands.add('disableFeature', (feature: string) => setFeature(feature, false));
|
||||
Cypress.Commands.add('enableQueueMode', () => setQueueMode(true));
|
||||
Cypress.Commands.add('disableQueueMode', () => setQueueMode(false));
|
||||
|
||||
@@ -30,6 +30,7 @@ declare global {
|
||||
disableFeature(feature: string): void;
|
||||
enableQueueMode(): void;
|
||||
disableQueueMode(): void;
|
||||
changeQuota(feature: string, value: number): void;
|
||||
waitForLoad(waitForIntercepts?: boolean): void;
|
||||
grantBrowserPermissions(...permissions: string[]): void;
|
||||
readClipboard(): Chainable<string>;
|
||||
|
||||
Reference in New Issue
Block a user