1

In a Alfresco webscript I want to get connected user. In share webscript I know there is a root object called "user" which allows us to get connected user properties.

But in Alfresco webscript this root object is undefined. Actualy I have to pass connected user's userName as argument of the webscript url.

Is there a way to directly get user properties in alfresco webscript (javascript) ?

I'm using alfresco 5.0.d.

Gagravarr
  • 47,320
  • 10
  • 111
  • 156
soung
  • 1,411
  • 16
  • 33

1 Answers1

8

Alfresco and share webscript has differrent set of javascript api.

You can find that on below link.

Alfresco : http://wiki.alfresco.com/wiki/4.0_JavaScript_API

Share : http://docs.alfresco.com/5.0/references/APISurf-rootscoped.html

person.properties.userName 

above will return current username in alfresco javascript.

Krutik Jayswal
  • 3,165
  • 1
  • 15
  • 38