Skip to content
Permalink
Browse files

fix: admins not seeing invite button

  • Loading branch information
barisusakli committed Mar 21, 2020
1 parent dd660c8 commit 8f4b99a41c6496cbdaaf489f16ecbe261d6c4a79
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/controllers/users.js
@@ -185,9 +185,8 @@ async function render(req, res, data) {
data.inviteOnly = registrationType === 'invite-only' || registrationType === 'admin-invite-only';
data.adminInviteOnly = registrationType === 'admin-invite-only';
data.invites = await user.getInvitesNumber(req.uid);
data.showInviteButton = req.loggedIn && (
(registrationType === 'invite-only' && (!data.maximumInvites || data.invites < data.maximumInvites)) ||
(registrationType === 'admin-invite-only' && data.isAdmin)
data.showInviteButton = req.loggedIn && data.inviteOnly && (
(data.isAdmin || (!data.maximumInvites || data.invites < data.maximumInvites))
);
data['reputation:disabled'] = meta.config['reputation:disabled'];

0 comments on commit 8f4b99a

Please sign in to comment.
You can’t perform that action at this time.