diff --git a/CHANGELOG-EE b/CHANGELOG-EE index c4fdcebdba11279d21c6b4e3706684f550f2fcc0..3455fcb7bcfebf49514e278a416868668673a745 100644 --- a/CHANGELOG-EE +++ b/CHANGELOG-EE @@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.13.0 (unreleased) - Fix 500 error updating mirror URLs for projects - Fix validations related to mirroring settings form. !773 + - Fix Git access panel for Wikis when Kerberos authentication is enabled (Borja Aparicio) v 8.12.5 (unreleased) diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index 4c74f0b81d6ee42969a9c03f5da68cd48b40266f..c17421b3d0974ae2b3c85edee0d716aea52c76e4 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -45,6 +45,11 @@ def http_url_to_repo [Gitlab.config.gitlab.url, "/", path_with_namespace, ".git"].join('') end + # No need to have a Kerberos Web url. Kerberos URL will be used only to clone + def kerberos_url_to_repo + [Gitlab.config.build_gitlab_kerberos_url, "/", path_with_namespace, ".git"].join('') + end + def wiki_base_path [Gitlab.config.gitlab.relative_url_root, "/", @project.path_with_namespace, "/wikis"].join('') end diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index 58b57bd4fef4dc94d1eecd60f2d6f4ae33f6c5c3..c1baac00378ebada19bdbd1afc23ad4d91bff7b1 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -42,6 +42,14 @@ end end + describe "#kerberos_url_to_repo" do + it 'returns valid kerberos url for this repo' do + gitlab_kerberos_url = Gitlab.config.build_gitlab_kerberos_url + repo_kerberos_url = "#{gitlab_kerberos_url}/#{subject.path_with_namespace}.git" + expect(subject.kerberos_url_to_repo).to eq(repo_kerberos_url) + end + end + describe "#wiki_base_path" do it "returns the wiki base path" do wiki_base_path = "#{Gitlab.config.gitlab.relative_url_root}/#{project.path_with_namespace}/wikis"