Commit a56cec113204130385e0fbc3f2223d81101357ef
1 parent
ad3a88cf
Exists in
master
and in
4 other branches
specify gitolite-admin owner in config
Showing
3 changed files
with
6 additions
and
12 deletions
Show diff stats
config/gitlab.yml.example
config/initializers/1_settings.rb
... | ... | @@ -102,6 +102,10 @@ class Settings < Settingslogic |
102 | 102 | git_host['admin_uri'] || 'git@localhost:gitolite-admin' |
103 | 103 | end |
104 | 104 | |
105 | + def gitolite_admin_key | |
106 | + git_host['gitolite_admin_key'] || 'gitlab' | |
107 | + end | |
108 | + | |
105 | 109 | def default_projects_limit |
106 | 110 | app['default_projects_limit'] || 10 |
107 | 111 | end | ... | ... |
lib/gitlab/backend/gitolite_config.rb
... | ... | @@ -148,18 +148,7 @@ module Gitlab |
148 | 148 | # Enable access to all repos for gitolite admin. |
149 | 149 | # We use it for accept merge request feature |
150 | 150 | def admin_all_repo |
151 | - owner_name = "" | |
152 | - | |
153 | - # Read gitolite-admin user | |
154 | - # | |
155 | - begin | |
156 | - repo = conf.get_repo("gitolite-admin") | |
157 | - owner_name = repo.permissions[0]["RW+"][""][0] | |
158 | - raise StandardError if owner_name.blank? | |
159 | - rescue => ex | |
160 | - puts "Can't determine gitolite-admin owner".red | |
161 | - raise StandardError | |
162 | - end | |
151 | + owner_name = Gitlab.settings.gitolite_admin_key | |
163 | 152 | |
164 | 153 | # @ALL repos premission for gitolite owner |
165 | 154 | repo_name = "@all" | ... | ... |