Copilot commented on code in PR #13950:
URL: https://github.com/apache/cloudstack/pull/13950#discussion_r4512408206


##########
ui/src/config/section/account.js:
##########
@@ -121,6 +121,34 @@ export default {
       },
       component: shallowRef(defineAsyncComponent(() => 
import('@/views/iam/AddLdapAccount.vue')))
     },
+    {
+      api: 'linkAccountToLdap',
+      icon: 'LinkOutlined',
+      label: 'label.link.account.to.ldap',
+      docHelp: 
'adminguide/accounts.html#using-an-ldap-server-for-user-authentication',
+      dataView: true,
+      show: (record, store) => {
+        return store.isLdapEnabled
+      },
+      args: ['type', 'domainid', 'ldapdomain', 'account', 'accounttype', 
'roleid', 'admin'],

Review Comment:
   Both `accounttype` and `roleid` are optional in the API metadata, so this 
form permits submitting with neither value. The backend then rejects the 
request because `LdapManagerImpl.linkAccountToLdap` requires 
`cmd.getAccountType() != null || cmd.getRoleId() != null`, making the new 
action fail unless the user happens to select one of these fields. Supply a 
normal-account default (or add cross-field validation requiring one of the two) 
before submitting.



-- 
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]

Reply via email to