diff options
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 7140719556e..0e6f0e9a8f9 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -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 |