diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-08-16 23:51:22 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-08-16 23:51:22 +0530 |
commit | d9efc7d9e6eb0b8247226c2fe2e929598f297056 (patch) | |
tree | 4b7347e8c462d65b12c87a2292d7879ee44fbaf2 /app/controllers/import/gitlab_projects_controller.rb | |
parent | 8c101fc313208b2256f9b9a2d596a0b398f173e0 (diff) | |
parent | 7f853e2245eff92c037af5e007163d3e9631888d (diff) | |
download | gitlab-ce-ee-581-backport-changes.tar.gz |
Merge remote-tracking branch 'origin/master' into ee-581-backport-changesee-581-backport-changes
Diffstat (limited to 'app/controllers/import/gitlab_projects_controller.rb')
-rw-r--r-- | app/controllers/import/gitlab_projects_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/import/gitlab_projects_controller.rb b/app/controllers/import/gitlab_projects_controller.rb index 3ec173abcdb..7d0eff37635 100644 --- a/app/controllers/import/gitlab_projects_controller.rb +++ b/app/controllers/import/gitlab_projects_controller.rb @@ -1,5 +1,6 @@ class Import::GitlabProjectsController < Import::BaseController before_action :verify_gitlab_project_import_enabled + before_action :authenticate_admin! def new @namespace_id = project_params[:namespace_id] @@ -47,4 +48,8 @@ class Import::GitlabProjectsController < Import::BaseController :path, :namespace_id, :file ) end + + def authenticate_admin! + render_404 unless current_user.is_admin? + end end |