Fix few bugs and tests after refactoring ownership logic
This commit is contained in:
parent
00a1f5bc2c
commit
d431e43392
19 changed files with 58 additions and 61 deletions
|
@ -187,4 +187,9 @@ class User < ActiveRecord::Base
|
|||
(projects.namespace_id IS NULL AND projects.creator_id = :user_id)",
|
||||
namespaces: namespaces.map(&:id), user_id: self.id)
|
||||
end
|
||||
|
||||
# Team membership in personal projects
|
||||
def tm_in_personal_projects
|
||||
personal_projects.users_projects.where(user_id: self.id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue