From 8e94a4aa1eb9af2a4f724542c7fddfe2dc61b46c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 28 Nov 2025 12:43:34 +0100 Subject: [PATCH] Better wording --- app/controllers/rooms/closeds_controller.rb | 2 +- app/controllers/rooms/opens_controller.rb | 2 +- app/controllers/rooms_controller.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/rooms/closeds_controller.rb b/app/controllers/rooms/closeds_controller.rb index 6b28738..0e8bdf7 100644 --- a/app/controllers/rooms/closeds_controller.rb +++ b/app/controllers/rooms/closeds_controller.rb @@ -3,7 +3,7 @@ class Rooms::ClosedsController < RoomsController before_action :ensure_can_administer, only: %i[ update ] before_action :remember_last_room_visited, only: :show before_action :force_room_type, only: %i[ edit update ] - before_action :ensure_eligible_to_create_rooms, only: %i[ new create ] + before_action :ensure_permission_to_create_rooms, only: %i[ new create ] DEFAULT_ROOM_NAME = "New room" diff --git a/app/controllers/rooms/opens_controller.rb b/app/controllers/rooms/opens_controller.rb index 00c7155..c2bda9e 100644 --- a/app/controllers/rooms/opens_controller.rb +++ b/app/controllers/rooms/opens_controller.rb @@ -3,7 +3,7 @@ class Rooms::OpensController < RoomsController before_action :ensure_can_administer, only: %i[ update ] before_action :remember_last_room_visited, only: :show before_action :force_room_type, only: %i[ edit update ] - before_action :ensure_eligible_to_create_rooms, only: %i[ new create ] + before_action :ensure_permission_to_create_rooms, only: %i[ new create ] DEFAULT_ROOM_NAME = "New room" diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index 3b8ac2e..5de20f2 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -31,7 +31,7 @@ class RoomsController < ApplicationController head :forbidden unless Current.user.can_administer?(@room) end - def ensure_eligible_to_create_rooms + def ensure_permission_to_create_rooms if Current.account.restrict_room_creation_to_administrators? && !Current.user.administrator? head :forbidden end