<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get current user from the action in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110475#M77627</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As the action is configured in Spring config, you can use IoC to access services including PersonService and AuthenticationService - then you can do this kind of thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef person = personService.getPerson(authenticationService.getCurrentUserName());&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;That shows getting the current username and also getting the current Person node that represents the current user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See org.alfresco.repo.action.executer.MailActionExecuter in the Alfresco SDK for an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2007 16:56:01 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2007-06-05T16:56:01Z</dc:date>
    <item>
      <title>get current user from the action</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110474#M77626</link>
      <description>I'm creating a custom action by extending ActionExecuterAbstractBase and need to get the user that fired the action. Can I get it by the Action/NodeRef passed to executeImpl()? Or by IoC? Or it is not possible? thanks for reading</description>
      <pubDate>Tue, 05 Jun 2007 16:00:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110474#M77626</guid>
      <dc:creator>ale_carraro</dc:creator>
      <dc:date>2007-06-05T16:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: get current user from the action</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110475#M77627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As the action is configured in Spring config, you can use IoC to access services including PersonService and AuthenticationService - then you can do this kind of thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;NodeRef person = personService.getPerson(authenticationService.getCurrentUserName());&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;That shows getting the current username and also getting the current Person node that represents the current user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See org.alfresco.repo.action.executer.MailActionExecuter in the Alfresco SDK for an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 16:56:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110475#M77627</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-06-05T16:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: get current user from the action</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110476#M77628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you very much! I was not able to find the getCurrentPerson, I thought it was in the person service… but it is not &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 16:22:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-current-user-from-the-action/m-p/110476#M77628</guid>
      <dc:creator>ale_carraro</dc:creator>
      <dc:date>2007-06-06T16:22:06Z</dc:date>
    </item>
  </channel>
</rss>

