summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-01-26 11:59:05 +0000
committerDouwe Maan <douwe@gitlab.com>2016-01-26 11:59:05 +0000
commit28e2d2142c2085981d16d49a6b97b85996b08a55 (patch)
treee89bb4f88a14bd53b9b84de9371d6232a8794c9e /app
parenteb7f669073b2b95a1956de5e22f97dc8f83711e8 (diff)
parenta7c4d0da8c7a340efd7b92718cd0f9436f2ec56f (diff)
downloadgitlab-ce-28e2d2142c2085981d16d49a6b97b85996b08a55.tar.gz
Merge branch 'rs-groups-index' into 'master'
Make the `/groups` route behave as expected The route is supposed to redirect the Groups#index request based on whether or not a user was logged in. If they are, we redirect them to their groups dashboard; if they're not, we redirect them to the public Explore page. But due to overly aggressive `before_action`s that weren't excluding (or including) the `index` action, the request always resulted in a 404, whether a user was logged in or not. Closes #12660 See merge request !2580
Diffstat (limited to 'app')
-rw-r--r--app/controllers/groups_controller.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index fb26a4e6fc3..f7c9e619755 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -2,17 +2,18 @@ class GroupsController < Groups::ApplicationController
include IssuesAction
include MergeRequestsAction
- skip_before_action :authenticate_user!, only: [:show, :issues, :merge_requests]
respond_to :html
- before_action :group, except: [:new, :create]
+
+ skip_before_action :authenticate_user!, only: [:index, :show, :issues, :merge_requests]
+ before_action :group, except: [:index, :new, :create]
# Authorize
- before_action :authorize_read_group!, except: [:show, :new, :create, :autocomplete]
+ before_action :authorize_read_group!, except: [:index, :show, :new, :create, :autocomplete]
before_action :authorize_admin_group!, only: [:edit, :update, :destroy, :projects]
before_action :authorize_create_group!, only: [:new, :create]
# Load group projects
- before_action :load_projects, except: [:new, :create, :projects, :edit, :update, :autocomplete]
+ before_action :load_projects, except: [:index, :new, :create, :projects, :edit, :update, :autocomplete]
before_action :event_filter, only: :show
layout :determine_layout