diff options
author | Robert Speicher <robert@gitlab.com> | 2018-04-12 17:04:08 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-04-12 17:04:08 +0000 |
commit | f5a3d8f75de50f0ac6a14e77c672da79df85866e (patch) | |
tree | b0d3655e4a738867696e82cee07309b17e175531 /app/controllers/projects/application_controller.rb | |
parent | 64f91be000bc2963a48851db4dcb0a6bbd2b57bc (diff) | |
parent | eae2ed3366ac13832c56aefe965513b986d7e8b1 (diff) | |
download | gitlab-ce-f5a3d8f75de50f0ac6a14e77c672da79df85866e.tar.gz |
Merge branch 'dm-archived-read-only' into 'master'
Make archived projects completely read-only
Closes #44788
See merge request gitlab-org/gitlab-ce!18136
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index 6d9b42a2c04..032bb2267e7 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -1,5 +1,6 @@ class Projects::ApplicationController < ApplicationController include RoutableActions + include ChecksCollaboration skip_before_action :authenticate_user! before_action :project @@ -31,14 +32,6 @@ class Projects::ApplicationController < ApplicationController @repository ||= project.repository end - def can_collaborate_with_project?(project = nil, ref: nil) - project ||= @project - - can?(current_user, :push_code, project) || - (current_user && current_user.already_forked?(project)) || - user_access(project).can_push_to_branch?(ref) - end - def authorize_action!(action) unless can?(current_user, action, project) return access_denied! @@ -91,9 +84,4 @@ class Projects::ApplicationController < ApplicationController def check_issues_available! return render_404 unless @project.feature_available?(:issues, current_user) end - - def user_access(project) - @user_access ||= {} - @user_access[project] ||= Gitlab::UserAccess.new(current_user, project: project) - end end |