Skip to content

Commit

Permalink
[#176] Show add new user button only if there is internal profile
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan authored and blcham committed Oct 2, 2024
1 parent f13cae2 commit 3f7d132
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/institution/InstitutionMembers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Loader, { LoaderSmall } from "../Loader";
import PropTypes from "prop-types";
import { isAdmin } from "../../utils/SecurityUtils";
import PromiseTrackingMask from "../misc/PromiseTrackingMask";
import IfInternalAuth from "../misc/oidc/IfInternalAuth.jsx";

class InstitutionMembers extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -75,13 +76,15 @@ class InstitutionMembers extends React.Component {
) : (
<p className="font-italic">{this.i18n("institution.members.not-found")}</p>
)}
{isAdmin(currentUser) && (
<div className="btn-toolbar">
<Button variant="primary" size="sm" onClick={() => onAddNewUser(institution)}>
{this.i18n("users.add-new-user")}
</Button>
</div>
)}
<IfInternalAuth>
{isAdmin(currentUser) && (
<div className="btn-toolbar">
<Button variant="primary" size="sm" onClick={() => onAddNewUser(institution)}>
{this.i18n("users.add-new-user")}
</Button>
</div>
)}
</IfInternalAuth>
</Card.Body>
</Card>
);
Expand Down

0 comments on commit 3f7d132

Please sign in to comment.