aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-03-25 14:52:09 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-03-25 14:52:09 +0100
commit83dd467a6b49b6048b86b1eb8a9416926a1d1077 (patch)
treeec7f5711aa05ff4ed5621bb0fc8b34cb7fac208d /server/sonar-web/src/main/js/apps/account
parent464e7dada18bc5f4082523a7e08326c245540e2c (diff)
downloadsonarqube-83dd467a6b49b6048b86b1eb8a9416926a1d1077.tar.gz
sonarqube-83dd467a6b49b6048b86b1eb8a9416926a1d1077.zip
SONAR-7397 The "Change Password" form must be available in the UI only for local accounts
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account')
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Security.js4
-rw-r--r--server/sonar-web/src/main/js/apps/account/containers/SecurityContainer.js5
2 files changed, 3 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.js b/server/sonar-web/src/main/js/apps/account/components/Security.js
index 52f0a1a9e74..ec220d082c5 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Security.js
+++ b/server/sonar-web/src/main/js/apps/account/components/Security.js
@@ -22,7 +22,7 @@ import React from 'react';
import Password from './Password';
import Tokens from './Tokens';
-export default function Security ({ user, canChangePassword }) {
+export default function Security ({ user }) {
return (
<div className="page page-limited">
<div className="columns">
@@ -30,7 +30,7 @@ export default function Security ({ user, canChangePassword }) {
<Tokens user={user}/>
</div>
- {canChangePassword && (
+ {user.local && (
<div className="column-half">
<Password user={user}/>
</div>
diff --git a/server/sonar-web/src/main/js/apps/account/containers/SecurityContainer.js b/server/sonar-web/src/main/js/apps/account/containers/SecurityContainer.js
index 72bf0c1e4fa..8a800b71fb4 100644
--- a/server/sonar-web/src/main/js/apps/account/containers/SecurityContainer.js
+++ b/server/sonar-web/src/main/js/apps/account/containers/SecurityContainer.js
@@ -22,10 +22,7 @@ import { connect } from 'react-redux';
import Security from './../components/Security';
function mapStateToProps (state) {
- return {
- user: state.user,
- canChangePassword: window.sonarqube.user.canChangePassword
- };
+ return { user: state.user };
}
export default connect(mapStateToProps)(Security);