Skip to content

Commit 6486328

Browse files
Merge pull request #104 from Luci2015/v2
remove removeFromDomain action
2 parents 9fce52f + f8dda00 commit 6486328

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

tests/test_functional.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -355,27 +355,12 @@ def test_remove_from_organization_delete_adobeid():
355355
"user": "[email protected]",
356356
"useAdobeID": True}
357357

358-
359-
def test_delete_account_enterpriseid():
360-
user = UserAction(id_type=IdentityTypes.enterpriseID, email="[email protected]")
361-
user.delete_account()
362-
assert user.wire_dict() == {"do": [{"removeFromDomain": {}}],
363-
"user": "[email protected]"}
364-
365-
366-
def test_delete_account_adobeid():
367-
user = UserAction(id_type=IdentityTypes.adobeID, email="[email protected]")
368-
with pytest.raises(ValueError):
369-
user.delete_account()
370-
371-
372358
def test_add_to_products():
373359
group = UserGroupAction(group_name="SampleUsers")
374360
group.add_to_products(products=["Photoshop", "Illustrator"])
375361
assert group.wire_dict() == {"do": [{"add": {"productConfiguration": ["Photoshop", "Illustrator"]}}],
376362
"usergroup": "SampleUsers"}
377363

378-
379364
def test_add_to_products_all():
380365
group = UserGroupAction(group_name="SampleUsers")
381366
group.add_to_products(all_products=True)

umapi_client/functional.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,6 @@ def remove_from_organization(self, delete_account=False):
278278
self.append(removeFromOrg={"deleteAccount": True if delete_account else False})
279279
return None
280280

281-
def delete_account(self):
282-
"""
283-
Delete a user's account.
284-
Deleting the user's account can only be done if the user's domain is controlled by the authorized organization,
285-
and removing the account will also remove the user from all organizations with access to that domain.
286-
:return: None, because you cannot follow this command with another.
287-
"""
288-
if self.id_type == IdentityTypes.adobeID:
289-
raise ArgumentError("You cannot delete an Adobe ID account.")
290-
self.append(removeFromDomain={})
291-
return None
292-
293281

294282
class UsersQuery(QueryMultiple):
295283
"""

0 commit comments

Comments
 (0)