fix(acl): write roles to acl after app load

This commit is contained in:
chenos 2022-10-27 15:27:08 +08:00
parent 419a6e4cbf
commit a1fba4ba26
2 changed files with 5 additions and 3 deletions

View File

@ -268,8 +268,10 @@ export class PluginACL extends Plugin {
}); });
// sync database role data to acl // sync database role data to acl
this.app.on('beforeStart', async () => { this.app.on('afterLoad', async (app, options) => {
await this.writeRolesToACL(); if (options.method !== 'install') {
await this.writeRolesToACL();
}
}); });
this.app.on('beforeInstallPlugin', async (plugin) => { this.app.on('beforeInstallPlugin', async (plugin) => {

View File

@ -17,7 +17,7 @@ export class CustomPagePlugin extends Plugin {
reset: 'Rate-Limit-Reset', reset: 'Rate-Limit-Reset',
total: 'Rate-Limit-Total', total: 'Rate-Limit-Total',
}, },
max: 20, max: 200,
disableHeader: false, disableHeader: false,
whitelist: (ctx) => { whitelist: (ctx) => {
// some logic that returns a boolean // some logic that returns a boolean