[Building Sakai] Adding member to Site with API: "role undefined" although it exists
Michael Mertins
mertins at zedat.fu-berlin.de
Wed Dec 11 15:57:42 PST 2013
Hello,
when I try to add a new member to a site I use
site.addMember(userid, "Student", true, false);
The role "Student" exists and can be found with
site.getRoles()
(toString() gives org.sakaiproject.authz.impl.BaseRole at f3371a1b on ID
"Student")
The site has status not joinable. Can I still add a member to it with the
API? Manually this is possible.
Is there any other reason why the user cannot be added and why I still get
this error:
2013-12-12 00:44:32,337 WARN ajp-bio-127.0.0.1-8009-exec-10
org.sakaiproject.authz.impl.BaseAuthzGroup - .addUserRole: role undefined:
"Student"
Do I need to use another Service to add the user to the role first?
Maybe someone knows...
Best wishes,
Michael
More information about the sakai-dev
mailing list