<?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 How to get current logged in user and add to custom document action url in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-current-logged-in-user-and-add-to-custom-document/m-p/88325#M26549</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My target is to get the current logged in username and add it to a custom document action url. I think I can modify the actions.js file by adding custom function to access surf root object "user" like user.fullName, and then put a placeholder in &lt;SPAN&gt;share-documentlibrary-config.xml&amp;nbsp;&lt;/SPAN&gt;to make the custom action url, but using "var x = ${user.fullName} in actions.js returns "not defined" error message. It seems like&amp;nbsp;${user.fullName} can be only used in .ftl FreeMarker template file as a variable to access surf root objects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is there anyway I can implement this function?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 02:17:05 GMT</pubDate>
    <dc:creator>jasonzhang</dc:creator>
    <dc:date>2020-02-26T02:17:05Z</dc:date>
    <item>
      <title>How to get current logged in user and add to custom document action url</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-current-logged-in-user-and-add-to-custom-document/m-p/88325#M26549</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My target is to get the current logged in username and add it to a custom document action url. I think I can modify the actions.js file by adding custom function to access surf root object "user" like user.fullName, and then put a placeholder in &lt;SPAN&gt;share-documentlibrary-config.xml&amp;nbsp;&lt;/SPAN&gt;to make the custom action url, but using "var x = ${user.fullName} in actions.js returns "not defined" error message. It seems like&amp;nbsp;${user.fullName} can be only used in .ftl FreeMarker template file as a variable to access surf root objects.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.alfresco.com/6.1/references/APISurf-rootscoped.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is there anyway I can implement this function?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 02:17:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-current-logged-in-user-and-add-to-custom-document/m-p/88325#M26549</guid>
      <dc:creator>jasonzhang</dc:creator>
      <dc:date>2020-02-26T02:17:05Z</dc:date>
    </item>
  </channel>
</rss>

