diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-12 05:21:37 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-12 05:21:37 -0700 |
commit | 2d3fd6a142d286bb7d6355ed3601e618bc246112 (patch) | |
tree | 1b1c99150ac063d3d3e90583ce7b3c657e93ad5a /app/controllers/application_controller.rb | |
parent | bb98ed112c509c6265ba4dff81d7987c52a8748c (diff) | |
parent | eddf34f4af8a2cfdcea2586a91b0fc38a7ba0277 (diff) | |
download | gitlab-ce-2d3fd6a142d286bb7d6355ed3601e618bc246112.tar.gz |
Merge branch 'master' into sh-support-bitbucket-server-import
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f864fbcaa43..5194bdb6105 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -30,7 +30,14 @@ class ApplicationController < ActionController::Base protect_from_forgery with: :exception, prepend: true helper_method :can? - helper_method :import_sources_enabled?, :github_import_enabled?, :gitea_import_enabled?, :github_import_configured?, :gitlab_import_enabled?, :gitlab_import_configured?, :bitbucket_import_enabled?, :bitbucket_import_configured?, :google_code_import_enabled?, :fogbugz_import_enabled?, :git_import_enabled?, :gitlab_project_import_enabled?, :bitbucket_server_import_enabled? + helper_method :import_sources_enabled?, :github_import_enabled?, + :gitea_import_enabled?, :github_import_configured?, + :gitlab_import_enabled?, :gitlab_import_configured?, + :bitbucket_import_enabled?, :bitbucket_import_configured?, + :bitbucket_server_import_enabled?, + :google_code_import_enabled?, :fogbugz_import_enabled?, + :git_import_enabled?, :gitlab_project_import_enabled?, + :manifest_import_enabled? rescue_from Encoding::CompatibilityError do |exception| log_exception(exception) @@ -355,6 +362,10 @@ class ApplicationController < ActionController::Base Gitlab::CurrentSettings.import_sources.include?('gitlab_project') end + def manifest_import_enabled? + Group.supports_nested_groups? && Gitlab::CurrentSettings.import_sources.include?('manifest') + end + # U2F (universal 2nd factor) devices need a unique identifier for the application # to perform authentication. # https://developers.yubico.com/U2F/App_ID.html |