mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
fix: manage user btn will only show for admins (#5238)
This commit is contained in:
parent
84e603124d
commit
e583e36c46
1 changed files with 7 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { appService } from '@/_services';
|
||||
import { appService, authenticationService } from '@/_services';
|
||||
import Modal from 'react-bootstrap/Modal';
|
||||
import Button from 'react-bootstrap/Button';
|
||||
import { toast } from 'react-hot-toast';
|
||||
|
|
@ -13,6 +13,7 @@ import { Link } from 'react-router-dom';
|
|||
class ManageAppUsersComponent extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.currentUser = authenticationService.currentUserValue;
|
||||
|
||||
this.state = {
|
||||
showModal: false,
|
||||
|
|
@ -258,9 +259,11 @@ class ManageAppUsersComponent extends React.Component {
|
|||
</Modal.Body>
|
||||
|
||||
<Modal.Footer>
|
||||
<Link to="/organization-settings" target="_blank" className="btn color-primary mt-3">
|
||||
Manage users
|
||||
</Link>
|
||||
{this.currentUser?.admin && (
|
||||
<Link to="/organization-settings" target="_blank" className="btn color-primary mt-3">
|
||||
Manage users
|
||||
</Link>
|
||||
)}
|
||||
</Modal.Footer>
|
||||
</Modal>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue