Skip to content

Commit

Permalink
OM-131: fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
olewandowski1 committed Feb 29, 2024
1 parent f4bdfd5 commit 29ea6f9
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/components/AdminMainMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ class AdminMainMenu extends Component {
const { rights } = this.props;
const entries = [];

if (this.isWorker) {
if (rights.includes(RIGHT_USERS)) {
entries.push({
text: formatMessage(this.props.intl, "admin", "menu.users"),
icon: <Person />,
route: "/admin/users",
});
}
if (this.isWorker && rights.includes(RIGHT_USERS)) {
entries.push({
text: formatMessage(this.props.intl, "admin", "menu.users"),
icon: <Person />,
route: "/admin/users",
});

if (!entries.length) return null;

Expand Down

0 comments on commit 29ea6f9

Please sign in to comment.