fix(acl): write roles to acl after app load
This commit is contained in:
parent
419a6e4cbf
commit
a1fba4ba26
@ -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) => {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user