09-11-2012 09:11 AM
I want to change the userWorkspace folder(physical) name with my own name. As per Nuxeo it is coming as a Username now. Please see the below URL for reference.
after this I am seeing my folder name as a 12345 from server side.
For this requirement I changed the below code for changing the server side URL.
protected static String getUserWorkspaceNameForUser(String userName) { return IdUtils.generateId("MyDocs", "-", false, 30); }
After changing above code I logged in as a Administrator and below is the URL and I can able to see physical folder name as a MyDocs .
Above url is for Administrator , when I login as a user it is showing the below error.
org.nuxeo.ecm.core.api.DocumentSecurityException. message: Privilege 'Read' is not granted to 'ravi'
Please sugget or help me, how to add permissions to users in the above scenario.
09-13-2012 05:29 AM
Hi,
If you change the code in a way that makes all user workspaces having the same name, then Administrator and "Ravi" will have the same user Workspace Object. But since Adminsitrator created it first, the Ravi as not rights on it 🙂
The idea is that the getUserWorkspaceNameForUser method should actually return something that do depend on the user, otherwise you will have more changes to do in the UserWorkspaceService implementation you contribute.
By the way, you do contribute a new Service extension / implementation, you don't directly change inside the original source code, right ?
Tiry
09-13-2012 06:55 AM
Below method i m extending and trying like this now.
protected static String myGetUserWorkspaceNameForUser(String userName) { return IdUtils.generateId(fullName, "-", false, 30); }
Above i m using fullname for userworkspace name in that case folder name is differant rite?
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.