-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domain Dependency for Tenancy #1789
Domain Dependency for Tenancy #1789
Conversation
assertEquals(dependentDomainList.getNames().size(), 1); | ||
assertEquals(dependentDomainList.getNames().get(0), tenantDomain.toLowerCase()); | ||
|
||
// Now delete the second resouce group and verify dependency still remains until the admin role is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@havetisyan Please note that putTenantResourceGroupRoles and deleteTenantResourceGroupRoles are not symmetrical in their creation and deletion of roles.
An admin role is created in putTenantResourceGroupRoles the first time that a resource group is created for a domain. It isn't removed when deleteTenantResourceGroupRoles is called.
To actually remove the role, we use the "deleteTenant" call.
For domain dependency - I keep the dependency until all roles are removed, including the admin. Let me know if you think the behavior should be different.
2eed716
to
63b7df3
Compare
dbService.putDomainDependency(ctx, tenantDomain, provider, auditRef, caller); | ||
} | ||
} | ||
} catch (ResourceException ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this try/catch block? I don't see which api is returning the unauthorized exception.
dbService.deleteDomainDependency(ctx, tenantDomain, serviceToDeregister, auditRef, caller); | ||
} | ||
} | ||
} catch (ResourceException ex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this try/catch block? I don't see which api is returning the unauthorized exception.
Signed-off-by: Ofer Levi <[email protected]>
63b7df3
to
7f96f6f
Compare
Signed-off-by: Ofer Levi <[email protected]>
Signed-off-by: Ofer Levi [email protected]