debian-mirror-gitlab/app/services/users/ban_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
306 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
module Users
2021-10-27 15:23:28 +05:30
class BanService < BannedUserBaseService
private
2021-06-08 01:23:25 +05:30
2021-10-27 15:23:28 +05:30
def update_user(user)
user.ban
2021-06-08 01:23:25 +05:30
end
2021-11-11 11:23:49 +05:30
def valid_state?(user)
user.active?
end
2021-10-27 15:23:28 +05:30
def action
:ban
2021-06-08 01:23:25 +05:30
end
end
end
2023-06-20 00:43:36 +05:30
Users::BanService.prepend_mod_with('Users::BanService')