diff --git a/src/js/angular/security/controllers.js b/src/js/angular/security/controllers.js index 4b18be399..2930ee155 100644 --- a/src/js/angular/security/controllers.js +++ b/src/js/angular/security/controllers.js @@ -377,6 +377,16 @@ securityCtrl.controller('CommonUserCtrl', ['$rootScope', '$scope', '$http', 'toa setGrantedAuthorities($scope); }; + $scope.resetCustomRoleField = function () { + if (!$scope.isUser()) { + $scope.customRoles = ""; + } + }; + + $scope.isUser = function () { + return $scope.userType === UserType.USER; + }; + $scope.hasReadPermission = function (repository) { const uniqueKey = createUniqueKey(repository); return $scope.userType === UserType.ADMIN || $scope.userType === UserType.REPO_MANAGER diff --git a/src/js/angular/security/templates/user.html b/src/js/angular/security/templates/user.html index ece1f808c..11dc9af29 100644 --- a/src/js/angular/security/templates/user.html +++ b/src/js/angular/security/templates/user.html @@ -181,7 +181,7 @@

{{'security.workbench.settings.title' | translate}}
-
+

{{'security.user.role' | translate}}

{{'security.user.custom_role' | translate}}

-