Get real user when using <runas>

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2009 09:36 AM
Alfresco,
I'm running a webscript with the <runas> parameter in my XML configuration:
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.
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2009 11:00 AM
No one?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2009 07:56 AM
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
http://wiki.alfresco.com/wiki/2.1_REST_API#Login
http://wiki.alfresco.com/wiki/Web_Scripts#Authenticating
