chore: load roles after start (#3763)

This commit is contained in:
ChengLei Shao 2024-03-20 14:40:11 +08:00 committed by GitHub
parent 3da340c88d
commit a2ae4f7b70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,11 +398,12 @@ export class PluginACL extends Plugin {
}; };
// sync database role data to acl // sync database role data to acl
this.app.on('afterLoad', async () => { this.app.on('afterStart', async () => {
await writeRolesToACL(this.app, { await writeRolesToACL(this.app, {
withOutResources: true, withOutResources: true,
}); });
}); });
// this.app.on('afterInstall', writeRolesToACL); // this.app.on('afterInstall', writeRolesToACL);
this.app.on('afterInstallPlugin', async (plugin) => { this.app.on('afterInstallPlugin', async (plugin) => {