1

I'm working with user properties in Sakai and I wish that through some Tool I'm developing a Teacher can alter some properties according to some criteria. I've selected the function user.upd.any in the Realm Role configuration but I keep getting the following error when I try to change the User:

org.sakaiproject.user.api.UserPermissionException user=d1dbdfee-d247-44e4-b5c2-d3d787c829ca function=user.upd.any resource=/user/115cf182-17b0-4f2c-a8fc-34fcbe98bac7
    at org.sakaiproject.user.impl.BaseUserDirectoryService.unlock(BaseUserDirectoryService.java:270)
    at org.sakaiproject.user.impl.BaseUserDirectoryService.editUser(BaseUserDirectoryService.java:1085)

This is the code that generates the stacktrace:

UserEdit ue = userDirectoryService.editUser(userId);
ue.getProperties().addProperty(name, value);
userDirectoryService.commitEdit(ue);

The code should have a if(userDirectoryService.allowUpdateUser(userId)){...}, but I will put this just when this permission issue have been troubleshooted (if I put this now, nothing happens: no permission)

Any advice?

Thanks

Virgílio Santos
  • 412
  • 2
  • 13
  • You need to share the relevant code – samottenhoff Sep 17 '14 at 00:03
  • Where are you adding these permissions? I believe the user.* permissions only work in the !user.template realms, so you have to assign them to specific user types rather than roles in sites. Maybe this documentation will help? https://source.sakaiproject.org/svn/reference/trunk/docs/architecture/sakai_permissions.doc – jonespm Dec 15 '14 at 17:13

0 Answers0