2021-05-14 18:10:34 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Users
|
2021-08-02 15:08:56 +00:00
|
|
|
class BanService < BannedUserBaseService
|
|
|
|
private
|
2021-05-14 18:10:34 +00:00
|
|
|
|
2021-08-02 15:08:56 +00:00
|
|
|
def update_user(user)
|
|
|
|
user.ban
|
2021-05-14 18:10:34 +00:00
|
|
|
end
|
|
|
|
|
2021-08-26 09:11:15 +00:00
|
|
|
def valid_state?(user)
|
|
|
|
user.active?
|
|
|
|
end
|
|
|
|
|
2021-08-02 15:08:56 +00:00
|
|
|
def action
|
|
|
|
:ban
|
2021-05-14 18:10:34 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|