mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-26 23:46:49 +09:00
Enforce restriction to create new rooms
This commit is contained in:
1 parent
f56e33e323
commit
15db4033bc
6 files changed
+31
-2
No files matched your search
@@ -31,6 +31,12 @@ class RoomsController < ApplicationController
|
||||
head :forbidden unless Current.user.can_administer?(@room)
|
||||
end
|
||||
|
||||
def ensure_eligible_to_create_rooms
|
||||
if Current.account.restrict_room_creation_to_administrators? && !Current.user.administrator?
|
||||
head :forbidden
|
||||
end
|
||||
end
|
||||
|
||||
def find_messages
|
||||
messages = @room.messages.with_creator.with_attachment_details.with_boosts
|
||||
|
||||
|
||||
Reference in new issue
Block a user