access.rb revision 1d30f949f910951ed77a466a5267ae3069df8410
if record.mirror? && (record.private_rw? || record.public_rw?)
end
end
end
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,
inclusion: { in: Repository::Access::OPTIONS }
end
end
access == 'private_r'
end
access == 'private_rw'
end
access == 'public_rw'
end
access == 'public_r'
end
end
end
end
end