def _getRightsAssignments(user_right):
 sids = []
 polHandle = win32security.LsaOpenPolicy(None, win32security.POLICY_ALL_ACCESS)
 sids = win32security.LsaEnumerateAccountsWithUserRight(polHandle, user_right)
 return sids

def _getRightsAssignments ( user_right ) : sids = [ ] polHandle = win32security . LsaOpenPolicy ( None , win32security . POLICY_ALL_ACCESS ) sids = win32security . LsaEnumerateAccountsWithUserRight ( polHandle , user_right ) return sids
helper function to return all the user rights assignments/users .