Skip to content

Commit

Permalink
Remove action buttons for disabled users
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldutra committed Jan 29, 2019
1 parent d17266e commit 576c3d0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/app/components/users/UserEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,14 @@ export class UserEdit extends React.Component {
<hr />
<DynamicForm fields={formFields} readOnly={user.isDisabled} onSubmit={this.handleSave} />
{this.changePasswordModal()}
{!user.isDisabled && this.renderApiKey()}
<hr />
<Button className="w-100 m-t-10" onClick={this.openChangePasswordModal}>Change Password</Button>
{currentUser.isAdmin && <Button className="w-100 m-t-10">Send Password Reset Email</Button>}
{!user.isDisabled && (
<React.Fragment>
{this.renderApiKey()}
<hr />
<Button className="w-100 m-t-10" onClick={this.openChangePasswordModal}>Change Password</Button>
{currentUser.isAdmin && <Button className="w-100 m-t-10">Send Password Reset Email</Button>}
</React.Fragment>
)}
</div>
);
}
Expand Down

0 comments on commit 576c3d0

Please sign in to comment.