fix: #7296, local login privilege available to registered-users only

v1.18.x
Julian Lam 6 years ago
parent d03220cdaf
commit 7fb3c16882

@ -179,7 +179,11 @@
}
return states.map(function (priv) {
var guestDisabled = ['groups:moderate', 'groups:posts:upvote', 'groups:posts:downvote'];
var disabled = member === 'guests' && guestDisabled.includes(priv.name);
var spidersEnabled = ['groups:find', 'groups:read', 'groups:topics:read'];
var disabled =
(member === 'guests' && guestDisabled.includes(priv.name)) ||
(member === 'spiders' && !spidersEnabled.includes(priv.name)) ||
(member !== 'registered-users' && priv.name === 'groups:local:login');
return '<td class="text-center" data-privilege="' + priv.name + '"><input type="checkbox"' + (priv.state ? ' checked' : '') + (disabled ? ' disabled="disabled"' : '') + ' /></td>';
}).join('');

Loading…
Cancel
Save