4 roles permission system
This commit is contained in:
parent
dac7c44ab3
commit
1c62ec09b0
18 changed files with 66 additions and 111 deletions
|
@ -1,11 +1,6 @@
|
|||
require File.join(Rails.root, "lib", "gitlabhq", "git_host")
|
||||
|
||||
class Repository
|
||||
REPO_N = 0
|
||||
REPO_R = 1
|
||||
REPO_RW = 2
|
||||
REPO_MASTER = 3
|
||||
|
||||
attr_accessor :project
|
||||
|
||||
def self.default_ref
|
||||
|
@ -13,12 +8,7 @@ class Repository
|
|||
end
|
||||
|
||||
def self.access_options
|
||||
{
|
||||
"Denied" => REPO_N,
|
||||
"Pull" => REPO_R,
|
||||
"Pull & Push" => REPO_RW,
|
||||
"Master" => REPO_MASTER
|
||||
}
|
||||
{}
|
||||
end
|
||||
|
||||
def initialize(project)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue