|
8 | 8 | MgmtV1, |
9 | 9 | Sort, |
10 | 10 | associated_tenants_to_dict, |
11 | | - map_to_values_object, |
12 | 11 | sort_to_dict, |
13 | 12 | ) |
14 | 13 | from descope.management.user_pwd import UserPassword |
@@ -652,7 +651,9 @@ def search_all( |
652 | 651 | to_modified_time (int): Optional int, only include users whose last modification/update occurred on or before this time (in Unix epoch milliseconds) |
653 | 652 | user_ids (List[str]): Optional list of user IDs to filter by |
654 | 653 | tenant_role_ids (dict): Optional mapping of tenant ID to list of role IDs. |
| 654 | + Dict value is in the form of {"tenant_id": {"values":["role_id1", "role_id2"], "and": True}} if you want to match all roles (AND) or any role (OR). |
655 | 655 | tenant_role_names (dict): Optional mapping of tenant ID to list of role names. |
| 656 | + Dict value is in the form of {"tenant_id": {"values":["role_name1", "role_name2"], "and": True}} if you want to match all roles (AND) or any role (OR). |
656 | 657 |
|
657 | 658 | Return value (dict): |
658 | 659 | Return dict in the format |
@@ -719,9 +720,9 @@ def search_all( |
719 | 720 | body["toModifiedTime"] = to_modified_time |
720 | 721 |
|
721 | 722 | if tenant_role_ids is not None: |
722 | | - body["tenantRoleIds"] = map_to_values_object(tenant_role_ids) |
| 723 | + body["tenantRoleIds"] = tenant_role_ids |
723 | 724 | if tenant_role_names is not None: |
724 | | - body["tenantRoleNames"] = map_to_values_object(tenant_role_names) |
| 725 | + body["tenantRoleNames"] = tenant_role_names |
725 | 726 |
|
726 | 727 | response = self._http.post( |
727 | 728 | MgmtV1.users_search_path, |
@@ -771,7 +772,9 @@ def search_all_test_users( |
771 | 772 | from_modified_time (int): Optional int, only include users whose last modification/update occurred on or after this time (in Unix epoch milliseconds) |
772 | 773 | to_modified_time (int): Optional int, only include users whose last modification/update occurred on or before this time (in Unix epoch milliseconds) |
773 | 774 | tenant_role_ids (dict): Optional mapping of tenant ID to list of role IDs. |
| 775 | + Dict value is in the form of {"tenant_id": {"values":["role_id1", "role_id2"], "and": True}} if you want to match all roles (AND) or any role (OR). |
774 | 776 | tenant_role_names (dict): Optional mapping of tenant ID to list of role names. |
| 777 | + Dict value is in the form of {"tenant_id": {"values":["role_name1", "role_name2"], "and": True}} if you want to match all roles (AND) or any role (OR). |
775 | 778 |
|
776 | 779 | Return value (dict): |
777 | 780 | Return dict in the format |
@@ -835,9 +838,9 @@ def search_all_test_users( |
835 | 838 | body["toModifiedTime"] = to_modified_time |
836 | 839 |
|
837 | 840 | if tenant_role_ids is not None: |
838 | | - body["tenantRoleIds"] = map_to_values_object(tenant_role_ids) |
| 841 | + body["tenantRoleIds"] = tenant_role_ids |
839 | 842 | if tenant_role_names is not None: |
840 | | - body["tenantRoleNames"] = map_to_values_object(tenant_role_names) |
| 843 | + body["tenantRoleNames"] = tenant_role_names |
841 | 844 |
|
842 | 845 | response = self._http.post( |
843 | 846 | MgmtV1.test_users_search_path, |
|
0 commit comments