diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-02 19:13:50 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-10 10:38:36 -0300 |
commit | 5551ccd7201ea6b45a2e2721502ba55e8f525d8f (patch) | |
tree | 65d9b9c37f1ed839d4e16953207e82a9629dd9dc /app/controllers/groups_controller.rb | |
parent | f2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d (diff) | |
download | gitlab-ce-5551ccd7201ea6b45a2e2721502ba55e8f525d8f.tar.gz |
Code improvements
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 13de19bc141..6532eee1602 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -9,7 +9,7 @@ class GroupsController < Groups::ApplicationController before_action :group, except: [:index, :new, :create] # Authorize - before_action :authorize_read_group!, except: [:index, :show, :new, :create, :autocomplete] + before_action :authorize_read_group!, except: [:index, :new, :create] before_action :authorize_admin_group!, only: [:edit, :update, :destroy, :projects] before_action :authorize_create_group!, only: [:new, :create] @@ -105,7 +105,7 @@ class GroupsController < Groups::ApplicationController # Dont allow unauthorized access to group def authorize_read_group! - unless @group and (@projects.present? or can?(current_user, :read_group, @group)) + unless can?(current_user, :read_group, @group) if current_user.nil? return authenticate_user! else |