Skip to content

Commit

Permalink
Merge pull request #1008 from hashmapinc/Tempus-1007
Browse files Browse the repository at this point in the history
Hide default dashboard for System admin.
  • Loading branch information
VikashSingh94 committed Jan 14, 2019
2 parents 8387ead + 5ba679b commit 501ba43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/app/user/user-fieldset.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<label translate>user.description</label>
<textarea ng-model="user.additionalInfo.description" rows="2"></textarea>
</md-input-container>
<section class="tb-default-dashboard" flex layout="column" ng-if="user.id">
<section class="tb-default-dashboard" flex layout="column" ng-if="user.id && userAuthority != 'SYS_ADMIN'">
<span class="tb-default-dashboard-label" ng-class="{'tb-disabled-label': $root.loading || !isEdit}" translate>user.default-dashboard</span>
<section flex layout="column" layout-gt-sm="row">
<tb-dashboard-autocomplete ng-if="isTenantAdmin()"
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/user/user.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ import userFieldsetTemplate from './user-fieldset.tpl.html';
/* eslint-enable import/no-unresolved, import/default */

/*@ngInject*/
export default function UserDirective($compile, $templateCache/*, dashboardService*/) {
export default function UserDirective($compile, $templateCache/*, dashboardService*/, userService) {
var linker = function (scope, element) {
var template = $templateCache.get(userFieldsetTemplate);
element.html(template);
scope.userAuthority = userService.getAuthority();
scope.isTenantAdmin = function() {
setFullScreenFlag();
return scope.user && scope.user.authority === 'TENANT_ADMIN';
Expand Down

0 comments on commit 501ba43

Please sign in to comment.