[plugin] Fixed setting permission if non are set
This commit is contained in:
parent
575090552f
commit
a4ce273bb1
|
@ -33,9 +33,11 @@ interface Backend {
|
||||||
export { Backend };
|
export { Backend };
|
||||||
|
|
||||||
function setPermissions(object: FG_Plugin.PluginRouteConfig) {
|
function setPermissions(object: FG_Plugin.PluginRouteConfig) {
|
||||||
|
if (object.permissions !== undefined) {
|
||||||
if (object.route.meta === undefined) object.route.meta = {};
|
if (object.route.meta === undefined) object.route.meta = {};
|
||||||
object.route.meta['permissions'] = object.permissions;
|
object.route.meta['permissions'] = object.permissions;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function convertRoutes(parent: RouteRecordRaw, children?: FG_Plugin.PluginRouteConfig[]) {
|
function convertRoutes(parent: RouteRecordRaw, children?: FG_Plugin.PluginRouteConfig[]) {
|
||||||
if (children === undefined) return;
|
if (children === undefined) return;
|
||||||
|
|
Loading…
Reference in New Issue