From 8025ff3debbaf171462b793d101742f8211b2a3a Mon Sep 17 00:00:00 2001 From: Max Chopart Date: Thu, 14 Dec 2023 13:18:43 +0100 Subject: [PATCH] [Upd #49] Refactor for readability --- js/components/user/User.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/components/user/User.js b/js/components/user/User.js index dea58c90..ddf5a6e2 100644 --- a/js/components/user/User.js +++ b/js/components/user/User.js @@ -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; @@ -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; @@ -265,8 +265,8 @@ class User extends React.Component {
{this._impersonateButton()} {isUsingOidcAuth() ? - this._redirectToKeycloak() : - this._passwordChange()} + this._redirectToKeycloakButton() : + this._passwordChangeButton()} {this._saveAndSendEmailButton()} {(currentUser.role === ROLE.ADMIN || currentUser.username === user.username) &&