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.

20 lines
249 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