vishesh92 commented on code in PR #8236:
URL: https://github.com/apache/cloudstack/pull/8236#discussion_r1616808406
##########
plugins/user-authenticators/ldap/src/main/java/org/apache/cloudstack/api/command/LinkAccountToLdapCmd.java:
##########
@@ -134,7 +138,14 @@ public String getAdmin() {
}
public Account.Type getAccountType() {
- return Account.Type.getFromValue(accountType);
+ if (accountType == null) {
+ return RoleType.getAccountTypeByRole(roleService.findRole(roleId),
null);
Review Comment:
@DaanHoogland This will return null if `roleId` is null. Is that fine?
@DaanHoogland Do we need some validations around input as well? e.g. both
account type & role id can't be null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]