#NEWLINE# def _allowed( self , request , datum ) : #NEWLINE# #INDENT# policy_check = getattr ( settings , 'POLICY_CHECK_FUNCTION' , None ) #NEWLINE# if ( datum and self . policy_rules ) : #NEWLINE# #INDENT# target = self . get_policy_target ( request , datum ) #NEWLINE# return ( policy_check ( self . policy_rules , request , target ) and self . allowed ( request , datum ) ) #NEWLINE# #UNINDENT# return self . allowed ( request , datum )