CREATE DEFINER=`jhise`@`localhost` PROCEDURE `project_get_user_permission`(in i_project_access_key char(32), in i_user_account_key char(32))
BEGIN
	select
		can_read,
		can_edit
	from
		permissions_project pp
			join project p on p.id = pp.project_id
	where
		pp.user_account_key = i_user_account_key and
		p.access_key = i_project_access_key;

END
