vishesh92 commented on code in PR #8236:
URL: https://github.com/apache/cloudstack/pull/8236#discussion_r1616809782
##########
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);
+ }
+ return RoleType.getAccountTypeByRole(roleService.findRole(roleId),
Account.Type.getFromValue(accountType.intValue()));
+ }
+
+ public Long getRoleId() {
+ return RoleType.getRoleByAccountType(roleId, getAccountType());
Review Comment:
This can be null as well. Is that fine?
--
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]