Skip to content

Commit 150d366

Browse files
authored
Add dsync intent to admin portal (#59)
1 parent 2632307 commit 150d366

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

tests/test_portal.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_create_organization(self, mock_organization, mock_request_method):
7777
assert subject["id"] == "org_01EHT88Z8J8795GZNQ4ZP1J81T"
7878
assert subject["name"] == "Test Organization"
7979

80-
def test_generate_link(self, mock_portal_link, mock_request_method):
80+
def test_generate_link_sso(self, mock_portal_link, mock_request_method):
8181
mock_response = Response()
8282
mock_response.status_code = 201
8383
mock_response.response_dict = mock_portal_link
@@ -88,6 +88,17 @@ def test_generate_link(self, mock_portal_link, mock_request_method):
8888

8989
assert subject["link"] == "https://id.workos.com/portal/launch?secret=secret"
9090

91+
def test_generate_link_dsync(self, mock_portal_link, mock_request_method):
92+
mock_response = Response()
93+
mock_response.status_code = 201
94+
mock_response.response_dict = mock_portal_link
95+
mock_request_method("post", mock_response, 201)
96+
97+
result = self.portal.generate_link("dsync", "org_01EHQMYV6MBK39QC5PZXHY59C3")
98+
subject = result.response_dict
99+
100+
assert subject["link"] == "https://id.workos.com/portal/launch?secret=secret"
101+
91102
def test_list_organizations(self, mock_organizations, mock_request_method):
92103
mock_response = Response()
93104
mock_response.status_code = 200

workos/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
__package_url__ = "https://github.com/workos-inc/workos-python"
1414

15-
__version__ = "0.8.5"
15+
__version__ = "0.8.6"
1616

1717
__author__ = "WorkOS"
1818

workos/portal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def generate_link(self, intent, organization, return_url=None):
4040
"""Generate a link to grant access to an organization's Admin Portal
4141
4242
Args:
43-
intent (str): The access scope for the generated Admin Portal link. Valid values are: ["sso"]
43+
intent (str): The access scope for the generated Admin Portal link. Valid values are: ["sso", "dsync"]
4444
organization (string): The ID of the organization the Admin Portal link will be generated for
4545
4646
Kwargs:

0 commit comments

Comments
 (0)