cancel
Showing results for 
Search instead for 
Did you mean: 

Get real user when using <runas>

simon
Champ in-the-making
Champ in-the-making
Alfresco,

I'm running a webscript with the <runas> parameter in my XML configuration:
<authentication runas="someuser">user</authentication>
This works fine, the webscript runs with the privileges of the specified user. It also returns "someuser" when I ask the current user's username:
model.username = person.properties.userName;
So far so good but is there a way to know the real user (and not the runas user)? I would like to know who is running the script.
2 REPLIES 2

simon
Champ in-the-making
Champ in-the-making
No one?

damiar
Champ in-the-making
Champ in-the-making
Not sure but… what would happen if you ask Alfresco for a ticket of "someUser" using the Tickets API and then execute the webscript using it? Of course you will have to remove the <runas> property from your configuration file.

http://wiki.alfresco.com/wiki/2.1_REST_API#Login
http://wiki.alfresco.com/wiki/Web_Scripts#Authenticating
Getting started

Tags


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.