Disable password change for non-DB auth

Fixes #344
This commit is contained in:
Joseph Schorr 2015-08-11 13:53:09 -04:00
parent fcfeb137bc
commit 16b012e05c
2 changed files with 4 additions and 2 deletions

View file

@ -10,7 +10,7 @@
})
}]);
function UserViewCtrl($scope, $routeParams, $timeout, ApiService, UserService, UIService, AvatarService) {
function UserViewCtrl($scope, $routeParams, $timeout, ApiService, UserService, UIService, AvatarService, Config) {
var username = $routeParams.username;
$scope.showInvoicesCounter = 0;
@ -59,6 +59,8 @@
};
$scope.changePassword = function() {
if (Config.AUTHENTICATION_TYPE != 'Database') { return; }
UIService.hidePopover('#changePasswordForm');
$scope.changePasswordInfo.state = 'changing';

View file

@ -170,7 +170,7 @@
</div>
<!-- Change Password -->
<div class="row" ng-show="changePasswordInfo.state !='changing'">
<div class="row" quay-show="Config.AUTHENTICATION_TYPE == 'Database' && changePasswordInfo.state !='changing'">
<div class="panel">
<div class="panel-title">Change Password</div>