#NEWLINE# def get_project( id , for_management = True ) : #NEWLINE# #INDENT# project = Project . query . get_or_404 ( id ) #NEWLINE# if id : #NEWLINE# #INDENT# permission_to_test = perms . manage_project ( id ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# permission_to_test = perms . view_project ( id ) #NEWLINE# #UNINDENT# permission_to_test . test ( http_exception = 403 ) #NEWLINE# return project