dashfolders: show/hide create folder or dashboard buttons

depending on the user role and the permissions the user has for a
folder.
This commit is contained in:
Daniel Lee
2018-01-09 14:44:36 +01:00
parent a8e9a4995c
commit e1aff1d5ff
5 changed files with 72 additions and 29 deletions
@@ -49,7 +49,7 @@ describe('ManageDashboards', () => {
},
];
ctrl = createCtrlWithStubs(response);
return ctrl.getDashboards();
return ctrl.refreshList();
});
it('should set checked to false on all sections and children', () => {
@@ -88,7 +88,7 @@ describe('ManageDashboards', () => {
];
ctrl = createCtrlWithStubs(response);
ctrl.folderId = 410;
return ctrl.getDashboards();
return ctrl.refreshList();
});
it('should set hide header to true on section', () => {
@@ -137,7 +137,7 @@ describe('ManageDashboards', () => {
ctrl.canMove = true;
ctrl.canDelete = true;
ctrl.selectAllChecked = true;
return ctrl.getDashboards();
return ctrl.refreshList();
});
it('should set checked to false on all sections and children', () => {
@@ -567,5 +567,5 @@ function createCtrlWithStubs(searchResponse: any, tags?: any) {
},
};
return new ManageDashboardsCtrl({}, { getNav: () => {} }, <SearchSrv>searchSrvStub);
return new ManageDashboardsCtrl({}, { getNav: () => {} }, <SearchSrv>searchSrvStub, { isEditor: true });
}