mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 23:40:38 +01:00
fix: internal helper method hasGlobalPrivilege, DRY
This commit is contained in:
@@ -243,9 +243,10 @@ async function render(req, res, data) {
|
||||
data['filterBy_' + validator.escape(String(filter))] = true;
|
||||
});
|
||||
|
||||
data.showInviteButton = await privileges.users.hasInvitePrivilege(req.uid);
|
||||
if (data.adminInviteOnly) {
|
||||
data.showInviteButton = await privileges.users.isAdministrator(req.uid);
|
||||
} else {
|
||||
data.showInviteButton = await privileges.users.hasInvitePrivilege(req.uid);
|
||||
}
|
||||
|
||||
res.render('admin/manage/users', data);
|
||||
|
||||
Reference in New Issue
Block a user