12-13-2007 01:52 PM
<webscript>
<shortname>AddUserToGroup</shortname>
<description>AddUserToGroup</description>
<url>/sample/AddUserToGroup</url>
<format default="html">argument</format>
<authentication>admin</authentication>
<transaction>required</transaction>
</webscript>
var user = people.getPerson("ggc");
var group = people.getGroup("Gerentes");
if (user == undefined)
{
status.code = 404;
status.message = "User not found";
status.redirect = true;
}
else if (group == undefined)
{
status.code = 404;
status.message = "Group not found";
status.redirect = true;
}
else
{
people.addAuthority(group,user);
}
<html>
<head>
<title>Groups</title>
</head>
<body>
User assigned to group
</body>
</html>
The Web Script /alfresco/service/sample/AddUserToGroup has responded with a status of 404 - Not Found.
404 Description: Requested resource is not available.
Message: [b]Group not found[/b]
Server: Alfresco Community Network v2.1.0 (R1 443) schema 62
Time: Dec 13, 2007 3:35:02 PM
Diagnostics: Inspect Web Script (org/EOC/AddUserToGroup.get)
0f512522-9f92-11dc-b07e-f5d358f2ab67
That's the name and group id of the group "Gerentes". Each time I create a group and ask its name, the answer is something similar.12-13-2007 02:44 PM
12-13-2007 03:09 PM
12-13-2007 06:07 PM
person.getGroup("GROUP_Gerentes").properties["usr:authorityName"]
which will give you back the "GROUP_Gerentes" string you passed-in.12-14-2007 08:22 AM
12-19-2007 10:48 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.