#NEWLINE# def case_users_filter( doc , users , groups = None ) : #NEWLINE# #INDENT# for id_ in ( doc . get ( 'owner_id' ) , doc . get ( 'user_id' ) ) : #NEWLINE# #INDENT# if id_ : #NEWLINE# #INDENT# if ( id_ in users ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# if ( groups and ( id_ in groups ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return False