Reporter cant create MR. Show user authorized projects in Admin area
This commit is contained in:
parent
96ba1708ac
commit
d1e63c7df2
6 changed files with 14 additions and 26 deletions
|
@ -57,13 +57,13 @@ class Ability
|
|||
def project_report_rules
|
||||
project_guest_rules + [
|
||||
:download_code,
|
||||
:write_merge_request,
|
||||
:write_snippet
|
||||
]
|
||||
end
|
||||
|
||||
def project_dev_rules
|
||||
project_report_rules + [
|
||||
:write_merge_request,
|
||||
:write_wiki,
|
||||
:push_code
|
||||
]
|
||||
|
|
|
@ -191,9 +191,9 @@ class User < ActiveRecord::Base
|
|||
namespaces: namespaces.map(&:id), user_id: self.id)
|
||||
end
|
||||
|
||||
# Team membership in personal projects
|
||||
def tm_in_personal_projects
|
||||
UsersProject.where(project_id: personal_projects.map(&:id), user_id: self.id)
|
||||
# Team membership in authorized projects
|
||||
def tm_in_authorized_projects
|
||||
UsersProject.where(project_id: authorized_projects.map(&:id), user_id: self.id)
|
||||
end
|
||||
|
||||
# Returns a string for use as a Gitolite user identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue