Updated readme, Roles in progress
This commit is contained in:
parent
37224dc9c1
commit
dac7c44ab3
15 changed files with 165 additions and 67 deletions
|
@ -1,4 +1,8 @@
|
|||
class UsersProject < ActiveRecord::Base
|
||||
REPORTER = 21
|
||||
DEVELOPER = 22
|
||||
MASTER = 33
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
|
||||
|
@ -41,6 +45,18 @@ class UsersProject < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def self.access_roles
|
||||
{
|
||||
"Reporter" => REPORTER,
|
||||
"Developer" => DEVELOPER,
|
||||
"Master" => MASTER
|
||||
}
|
||||
end
|
||||
|
||||
def role_access
|
||||
"#{project_access}#{repo_access}"
|
||||
end
|
||||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.new.configure do |c|
|
||||
c.update_project(project.path, project)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue