Skip to content

Commit

Permalink
[Upd #49] Refactor for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Dec 14, 2023
1 parent 48c3644 commit 8025ff3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/components/user/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class User extends React.Component {
});
};

_passwordChange() {
_passwordChangeButton() {
const {user, currentUser, handlers} = this.props;
if (user.isNew || (currentUser.username !== user.username && currentUser.role !== ROLE.ADMIN)) {
return null;
Expand All @@ -99,7 +99,7 @@ class User extends React.Component {
}
}

_redirectToKeycloak() {
_redirectToKeycloakButton() {
const {user, currentUser, handlers} = this.props;
if (user.isNew || (currentUser.username !== user.username)) {
return null;
Expand Down Expand Up @@ -265,8 +265,8 @@ class User extends React.Component {
<div className="buttons-line-height mt-3 text-center">
{this._impersonateButton()}
{isUsingOidcAuth() ?
this._redirectToKeycloak() :
this._passwordChange()}
this._redirectToKeycloakButton() :
this._passwordChangeButton()}
{this._saveAndSendEmailButton()}
{(currentUser.role === ROLE.ADMIN || currentUser.username === user.username) &&
<Button variant='success' size='sm' ref='submit' className="d-inline-flex"
Expand Down

0 comments on commit 8025ff3

Please sign in to comment.