Skip to content

Commit

Permalink
[backend] add migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyCloarec committed Jul 19, 2024
1 parent b2e21b0 commit 93d2978
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { logApp } from '../config/conf';
import { executionContext, SYSTEM_USER } from '../utils/access';
import { addCapability } from '../domain/grant';

const message = '[MIGRATION] add the new capability Bypass merge dependencies access check';

export const up = async (next) => {
logApp.info(`${message} > started`);
const context = executionContext('migration');

// ------ Create 'Bypass mandatory fields'
await addCapability(context, SYSTEM_USER, {
name: 'KNOWLEDGE_KNUPDATE_KNBYPASSRMERGE',
description: 'Bypass merge dependencies access check',
attribute_order: 340
});

logApp.info(`${message} > done`);
next();
};

export const down = async (next) => {
next();
};

0 comments on commit 93d2978

Please sign in to comment.