#NEWLINE# def _to_users( self , users_perms_and_groups , ticket ) : #NEWLINE# #INDENT# 'Finds all users contained in the list of `users_perms_and_groups`\n        by recursive lookup of users when a `group` is encountered.\n        ' #NEWLINE# ps = PermissionSystem ( self . env ) #NEWLINE# groups = ps . get_groups_dict ( ) #NEWLINE# def append_owners( users_perms_and_groups ) : #NEWLINE# #INDENT# for user_perm_or_group in users_perms_and_groups : #NEWLINE# #INDENT# if ( user_perm_or_group == 'authenticated' ) : #NEWLINE# #INDENT# owners . update ( set ( ( u [ 0 ] for u in self . env . get_known_users ( ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if user_perm_or_group . isupper ( ) : #NEWLINE# #INDENT# perm = user_perm_or_group #NEWLINE# for user in ps . get_users_with_permission ( perm ) : #NEWLINE# #INDENT# if ( perm in PermissionCache ( self . env , user , ticket . resource ) ) : #NEWLINE# #INDENT# owners . add ( user ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( user_perm_or_group not in groups ) : #NEWLINE# #INDENT# owners . add ( user_perm_or_group ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# append_owners ( groups [ user_perm_or_group ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# owners = set ( ) #NEWLINE# append_owners ( users_perms_and_groups ) #NEWLINE# return sorted ( owners )