fix(acl): no such table: roles
This commit is contained in:
parent
a1fba4ba26
commit
f477d80de4
@ -269,7 +269,11 @@ export class PluginACL extends Plugin {
|
||||
|
||||
// sync database role data to acl
|
||||
this.app.on('afterLoad', async (app, options) => {
|
||||
if (options.method !== 'install') {
|
||||
if (options.method === 'install') {
|
||||
return;
|
||||
}
|
||||
const exists = await this.app.db.collectionExistsInDb('roles');
|
||||
if (exists) {
|
||||
await this.writeRolesToACL();
|
||||
}
|
||||
});
|
||||
@ -443,7 +447,6 @@ export class PluginACL extends Plugin {
|
||||
directory: resolve(__dirname, 'collections'),
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default PluginACL;
|
||||
|
Loading…
Reference in New Issue
Block a user