repo & project access separated. critical gitolite bugfix
This commit is contained in:
parent
2ca00bdb3e
commit
cb021e5831
12 changed files with 106 additions and 48 deletions
|
@ -1,12 +1,24 @@
|
|||
require File.join(Rails.root, "lib", "gitlabhq", "git_host")
|
||||
|
||||
class Repository
|
||||
REPO_N = 0
|
||||
REPO_R = 1
|
||||
REPO_RW = 2
|
||||
|
||||
attr_accessor :project
|
||||
|
||||
def self.default_ref
|
||||
"master"
|
||||
end
|
||||
|
||||
def self.access_options
|
||||
{
|
||||
"Denied" => REPO_N,
|
||||
"Pull" => REPO_R,
|
||||
"Pull & Push" => REPO_RW
|
||||
}
|
||||
end
|
||||
|
||||
def initialize(project)
|
||||
@project = project
|
||||
end
|
||||
|
@ -33,7 +45,7 @@ class Repository
|
|||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.new.configure do |c|
|
||||
c.update_project(path, project.repository_writers)
|
||||
c.update_project(path, project)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue