Commit e77878bb by Daniel Lee

dashfolders: on folder page, hide tabs if not has admin permission

parent 61ed0b03
......@@ -90,7 +90,7 @@ export class AclCtrl {
}
return this.backendSrv.post(`/api/dashboards/id/${this.dashboard.id}/acl`, {
items: updated
items: updated,
});
}
......@@ -169,9 +169,9 @@ export function dashAclModal() {
bindToController: true,
controllerAs: 'ctrl',
scope: {
dashboard: "=",
meta: "="
}
dashboard: '=',
meta: '=',
},
};
}
......
......@@ -50,15 +50,20 @@ export class FolderPageLoader {
});
dashTab.url = folderUrl;
if (result.meta.canAdmin) {
const permTab = _.find(ctrl.navModel.main.children, {
id: 'manage-folder-permissions',
});
permTab.url = folderUrl + '/permissions';
const settingsTab = _.find(ctrl.navModel.main.children, {
id: 'manage-folder-settings',
});
settingsTab.url = folderUrl + '/settings';
} else {
ctrl.navModel.main.children = [dashTab];
}
return result;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment