cancel
Showing results for 
Search instead for 
Did you mean: 

I want to change the userWorkspace folder(physical) name with my own name. As per Nuxeo it is coming as a Username now.

kumuru_
Champ in-the-making
Champ in-the-making

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.

http://localhost:8080/nuxeo/nxpath/default/tenant-test/UserWorkspaces/12345@view_documents?tabIds=CL...

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 .

http://localhost:8080/nuxeo/nxpath/default/tenant-test/UserWorkspaces/MyDocs@view_documents?tabIds=C...

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.

2 REPLIES 2

Thierry_Delprat
Confirmed Champ
Confirmed Champ

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

kumuru_
Champ in-the-making
Champ in-the-making

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?

Getting started

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.