cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current logged in user and add to custom document action url

jasonzhang
Champ in-the-making
Champ in-the-making

Hello,

My target is to get the current logged in username and add it to a custom document action url. I think I can modify the actions.js file by adding custom function to access surf root object "user" like user.fullName, and then put a placeholder in share-documentlibrary-config.xml to make the custom action url, but using "var x = ${user.fullName} in actions.js returns "not defined" error message. It seems like ${user.fullName} can be only used in .ftl FreeMarker template file as a variable to access surf root objects. 

https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html

Is there anyway I can implement this function?

Thank you

0 REPLIES 0