fix: admins not seeing invite button

v1.18.x
Barış Soner Uşaklı 5 years ago
parent dd660c8778
commit 8f4b99a41c

@ -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'];

Loading…
Cancel
Save