AnsweredAssumed Answered

What 'root objects' are available to an action webscript ?

Question asked by annakan on Apr 19, 2011
Latest reply on Apr 21, 2011 by annakan
I try to implement an action on the document list that would allow a user to "sign" a document, adding a time-stamp and its name to a dedicated read only property/metadata.

from this http://wiki.alfresco.com/wiki/3.4_JavaScript_API#ScriptContent_API we are supposed to have several "root objects" (ugly globals right  :lol: ?) available but few of them are really present when my action runs  :roll: .

Most notably missing are the person object where I expected to retrieve the current logged in user / session user from.
Likewise, companyhome is not there, userhome neither, person is missing, people.isAdmin() does not exists …..


So what is the real context of an action ?
Where can I find the REAL objects available to me on a webscript depending on the context it is called ?
Can I reach and bring the one I miss into the scope through calls ?
And more pragmatically how can I access the current logged in user data and credentials from a webscript invoked through an action (function runAction(p_params) on the server side , this.modules.actions.genericAction() call on the client side.

is there something I miss completely there ?

Thanks a lot.

Outcomes