access.rb revision 8d050e0562ded9f29d349f3589d870fe9121f7e2
OPTIONS = [
['Private', 'private' ],
['Public readable', 'public_r' ],
['Public readable and writable', 'public_rw' ]
]
included do
if user
OR id IN (SELECT item_id FROM permissions WHERE item_type = 'Repository' AND subject_type = 'User' AND subject_id = ?)
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 = ?
else
end
end
presence: true,
end
access == 'private'
end
access == 'public_rw'
end
if access_changed? and access_was == 'private'
end
end
end