Allow system auditors to see notification templates and management jobs in the UI

This commit is contained in:
Akita Noek 2016-07-11 14:42:01 -04:00
parent 6de5cceb8f
commit 4c67c50373
3 changed files with 4 additions and 2 deletions

View File

@ -880,6 +880,7 @@ var tower = angular.module('Tower', [
}
// If browser refresh, set the user_is_superuser value
$rootScope.user_is_superuser = Authorization.getUserInfo('is_superuser');
$rootScope.user_is_system_auditor = Authorization.getUserInfo('is_system_auditor');
// state the user refreshes we want to open the socket, except if the user is on the login page, which should happen after the user logs in (see the AuthService module for that call to OpenSocket)
if(!_.contains($location.$$url, '/login')){
ConfigService.getConfig().then(function(){

View File

@ -137,6 +137,7 @@ export default ['$log', '$cookieStore', '$compile', '$window', '$rootScope',
$rootScope.sessionTimer = timer;
$rootScope.$emit('OpenSocket');
$rootScope.user_is_superuser = data.results[0].is_superuser;
$rootScope.user_is_system_auditor = data.results[0].is_system_auditor;
scope.$emit('AuthorizationGetLicense');
});
})

View File

@ -24,7 +24,7 @@
Add passwords, SSH keys, etc. for Tower to use when launching jobs against machines, or when syncing inventories or projects.
</p>
</a>
<a ui-sref="managementJobsList" class="SetupItem" ng-if="user_is_superuser">
<a ui-sref="managementJobsList" class="SetupItem" ng-if="user_is_superuser || user_is_system_auditor">
<h4 class="SetupItem-title">Management Jobs</h4>
<p class="SetupItem-description">
Manage the cleanup of old job history, activity streams, data marked for deletion, and system tracking info.
@ -37,7 +37,7 @@
</p>
</a>
<a ui-sref="notifications" class="SetupItem"
ng-if="orgAdmin">
ng-if="orgAdmin || user_is_system_auditor || user_is_superuser">
<h4 class="SetupItem-title">Notifications</h4>
<p class="SetupItem-description">
Create templates for sending notifications with Email, HipChat, Slack, and SMS.