access.rb revision d756a4e0f573b9895f5f99e210f049b9f4306b2d
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch OR id IN (SELECT item_id FROM permissions WHERE item_type = 'Repository' AND subject_type = 'User' AND subject_id = ?)
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch OR id IN (SELECT item_id FROM permissions INNER JOIN team_users ON team_users.team_id = permissions.subject_id AND team_users.user_id = ?
f9511e684858bf5f6ac77ab12254b85b737beae8Stephan Bosch WHERE item_type = 'Repository' AND subject_type = 'Team')", user, user)
f1edf7f20661ef9627acbf4054acddcba4d2eb3fStephan Bosch inclusion: { in: Repository::Access::OPTIONS }
f1edf7f20661ef9627acbf4054acddcba4d2eb3fStephan Bosch if access_changed? and access_was == 'private'
f1edf7f20661ef9627acbf4054acddcba4d2eb3fStephan Bosch permissions.where(role: 'reader').each { |p| p.destroy }