v1.18.x
Julian Lam 7 years ago
parent 9d90d19a6f
commit b7fc8493b7

@ -185,7 +185,10 @@
} }
} }
return states.map(function (priv) { return states.map(function (priv) {
return '<td class="text-center" data-privilege="' + priv.name + '"><input type="checkbox"' + (priv.state ? ' checked' : '') + (member === 'guests' && priv.name === 'groups:moderate' ? ' disabled="disabled"' : '') + ' /></td>'; var guestDisabled = ['groups:moderate', 'groups:posts:upvote', 'groups:posts:downvote'];
var disabled = member === 'guests' && guestDisabled.includes(priv.name);
return '<td class="text-center" data-privilege="' + priv.name + '"><input type="checkbox"' + (priv.state ? ' checked' : '') + (disabled ? ' disabled="disabled"' : '') + ' /></td>';
}).join(''); }).join('');
} }

Loading…
Cancel
Save