mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-08 15:50:08 +09:00
Merge pull request #316: List one page of account members at a time
Reviewed and merged by GPT on behalf of DHH.
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
module User::Bannable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
# Administrators still see banned users, so they can lift the ban.
|
||||
scope :visible_to, ->(user) { user.can_administer? ? where(status: %i[ active banned ]) : active }
|
||||
end
|
||||
|
||||
def ban
|
||||
transaction do
|
||||
create_bans_from_sessions
|
||||
|
||||
Reference in New Issue
Block a user