Skip to content

Commit

Permalink
#60 Set the default roles to RW
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jan 2, 2017
1 parent b5237d6 commit 7fecd54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions ui/app/scripts/controllers/admin/AdminUsersCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
angular.module('theHiveControllers').controller('AdminUsersCtrl',
function($scope, PSearchSrv, UserSrv, AlertSrv, appConfig) {
$scope.appConfig = appConfig;
$scope.canSetPass = appConfig.config.capabilities.indexOf('setPassword') !== -1;
$scope.canSetPass = appConfig.config.capabilities.indexOf('setPassword') !== -1;
$scope.newUser = {
roles: ['read','write']
};

/**
* users management page
Expand All @@ -14,7 +17,9 @@
});
$scope.initNewUser = function() {
$scope.apiKey = false;
$scope.newUser = {};
$scope.newUser = {
roles: ['read','write']
};
};
$scope.initNewUser();

Expand Down
2 changes: 1 addition & 1 deletion ui/app/views/partials/admin/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 class="vpad10">User management</h2>
{{newUser.roles.join(', ')}}&nbsp;&nbsp;
<span class="caret"></span>
</button>
<ul class="dropdown-menu" ng-init="newUser.roles = ['read']" role="menu">
<ul class="dropdown-menu" role="menu">
<li>
<a ng-click="newUser.roles = ['read']">read</a>
<a ng-click="newUser.roles = ['read','write']">read, write</a>
Expand Down

0 comments on commit 7fecd54

Please sign in to comment.