diff options
author | Go MAEDA <maeda@farend.jp> | 2023-01-04 01:05:20 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-01-04 01:05:20 +0000 |
commit | 1c937f1e2338173b137a730bf0a08797315eff2b (patch) | |
tree | 842f622ae7a831c1c016f40f12d6ec93b6e50c48 | |
parent | 025323f5ba7b48d001ba59cc94b26967fdf1d4a1 (diff) | |
download | redmine-1c937f1e2338173b137a730bf0a08797315eff2b.tar.gz redmine-1c937f1e2338173b137a730bf0a08797315eff2b.zip |
Use Group.visible instead of manual visibility check in GroupsController (#38144).
Patch by Holger Just.
git-svn-id: https://svn.redmine.org/redmine/trunk@22023 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/groups_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index c52b33008..85192a9d7 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -50,8 +50,6 @@ class GroupsController < ApplicationController end def show - return render_404 unless @group.visible? - respond_to do |format| format.html do render :layout => 'base' @@ -149,7 +147,7 @@ class GroupsController < ApplicationController private def find_group - @group = Group.find(params[:id]) + @group = Group.visible.find(params[:id]) rescue ActiveRecord::RecordNotFound render_404 end |