feat: skip permission
This commit is contained in:
parent
fc1a65a2fb
commit
0ee81dc221
@ -44,7 +44,7 @@ const plugins = [
|
|||||||
'@nocobase/plugin-file-manager',
|
'@nocobase/plugin-file-manager',
|
||||||
'@nocobase/plugin-system-settings',
|
'@nocobase/plugin-system-settings',
|
||||||
'@nocobase/plugin-users',
|
'@nocobase/plugin-users',
|
||||||
// '@nocobase/plugin-acl',
|
'@nocobase/plugin-acl',
|
||||||
'@nocobase/plugin-china-region',
|
'@nocobase/plugin-china-region',
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -52,6 +52,13 @@ for (const plugin of plugins) {
|
|||||||
api.plugin(require(plugin).default);
|
api.plugin(require(plugin).default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.acl.use(async (ctx, next) => {
|
||||||
|
ctx.permission = {
|
||||||
|
skip: true,
|
||||||
|
};
|
||||||
|
await next();
|
||||||
|
});
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
if (process.argv.length < 3) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
process.argv.push('start', '--port', process.env.API_PORT || 12302);
|
process.argv.push('start', '--port', process.env.API_PORT || 12302);
|
||||||
|
Loading…
Reference in New Issue
Block a user