mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Added user banning
This commit is contained in:
@ -22,6 +22,8 @@ App.Presenters.UserAccountSettingsPresenter = function(
|
||||
target = args.target;
|
||||
|
||||
privileges = {
|
||||
canBan:
|
||||
auth.hasPrivilege(auth.privileges.ban),
|
||||
canChangeAccessRank:
|
||||
auth.hasPrivilege(auth.privileges.changeAccessRank),
|
||||
canChangeAvatarStyle:
|
||||
@ -105,6 +107,9 @@ App.Presenters.UserAccountSettingsPresenter = function(
|
||||
if (privileges.canChangeAccessRank) {
|
||||
formData.accessRank = $el.find('[name=access-rank]:checked').val();
|
||||
}
|
||||
if (privileges.canBan) {
|
||||
formData.banned = $el.find('[name=ban]').is(':checked') ? 1 : 0;
|
||||
}
|
||||
|
||||
if (!validateAccountSettingsFormData(formData)) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user