mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 09:16:01 +00:00
bundled electron app starts without error
This commit is contained in:
@@ -3,13 +3,14 @@ import { useConfig } from './metadataLoaders';
|
||||
|
||||
let compiled = null;
|
||||
|
||||
const config = useConfig();
|
||||
config.subscribe(value => {
|
||||
if (!value) return;
|
||||
const { permissions } = value;
|
||||
compiled = compilePermissions(permissions);
|
||||
});
|
||||
|
||||
export default function hasPermission(tested) {
|
||||
return testPermission(tested, compiled);
|
||||
}
|
||||
|
||||
export function subscribePermissionCompiler() {
|
||||
useConfig().subscribe(value => {
|
||||
if (!value) return;
|
||||
const { permissions } = value;
|
||||
compiled = compilePermissions(permissions);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user