Ich versuche, in ColdFusion 10 mithilfe von Administrator API einen Admin-Benutzer zu erstellen. Unten ist mein Code:So verwenden Sie die Coldfusion Administrator-API Security.SetUser() -Methode
<cfscript>
// Create an object of administrator component and call the login method
adminObj = createObject("component","cfide.adminapi.administrator");
adminObj.login("Password1");
myObj = createObject("component","cfide.adminapi.security");
myObj.setUser(username="ramesh"
, password="Password1"
, allowadminaccess="True"
, Roles="Server Settings > Scheduled Tasks"
);
</cfscript>
Aber es wirft einen Fehler:
The ROLES argument passed to the setUser function is not of type array.
Wie gebe ich die Rollen als Array?