<?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: Getting username of the user who executed a repository tier web script in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275179#M228309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is strange, I never encountered root objects not being available in web script. You're on your own on that one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure as to why starting Alfresco through a .bat file does not work for you, do you get a concrete error? There's a setenv.bat file too, maybe it's setting environment variables to something that's not correct (had this issue once)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Feb 2013 22:39:10 GMT</pubDate>
    <dc:creator>lista</dc:creator>
    <dc:date>2013-02-17T22:39:10Z</dc:date>
    <item>
      <title>Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275174#M228304</link>
      <description>Title pretty much sums it up.I need to obtain the current user's username within a repo-tier webscript's javascript code. By "current user", i mean the authenticated user that triggered the execution of said script.I have tried to obtain this information using the now famous (to me anyway) root scop</description>
      <pubDate>Tue, 05 Feb 2013 22:14:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275174#M228304</guid>
      <dc:creator>mando_alvarado_</dc:creator>
      <dc:date>2013-02-05T22:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275175#M228305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that sounds strange since &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;person.properties.userName&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; gives you the name of the currently authenticated user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is your web script configured to have &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;authentication&amp;gt;user&amp;lt;/authentication&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; in its desc file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You may also use the debugger to check the content of the parameter…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrea&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 08:30:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275175#M228305</guid>
      <dc:creator>abarisone</dc:creator>
      <dc:date>2013-02-06T08:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275176#M228306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, the authentication type is set to "user" in the xml desc file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when trying to enable the debugger, i get the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Web Script /alfresco/service/api/javascript/debugger has responded with a status of 500 - Internal Error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;500 Description:&amp;nbsp;&amp;nbsp;&amp;nbsp; An error inside the HTTP server which prevented it from fulfilling the request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Message:&amp;nbsp;&amp;nbsp;&amp;nbsp;01060011 Wrapped Exception (with status template): null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception:&amp;nbsp;&amp;nbsp;&amp;nbsp;org.springframework.extensions.webscripts.WebScriptException - 01060011 Wrapped Exception (with status template): null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Server:&amp;nbsp;&amp;nbsp;&amp;nbsp;Community v4.2.0 (4480) schema 6,020&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Time:&amp;nbsp;&amp;nbsp;&amp;nbsp;Feb 6, 2013 1:56:05 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Diagnostics:&amp;nbsp;&amp;nbsp;&amp;nbsp;Inspect Web Script (org/springframework/extensions/webscripts/jsdebugger.post)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am hitting wall after wall here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 19:57:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275176#M228306</guid>
      <dc:creator>mando_alvarado_</dc:creator>
      <dc:date>2013-02-06T19:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275177#M228307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;JavaScript debugger won't work on headless servers and if you're starting Alfresco as a service, at least in my experience. Do you fall in these categories?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure I understand what you mean by repo-tier, can you explain that to me?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 10:36:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275177#M228307</guid>
      <dc:creator>lista</dc:creator>
      <dc:date>2013-02-12T10:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275178#M228308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By repo-tier webscripts, I mean webscripts that are in alfresco, not share. I.E they reside in the following path: /tomcat/webapps/alfresco/WEB-INF/clases/alfresco/templates/webscripts/. I don't know if that is the right way to call these webscripts, but I seem to have picked up the term "repo-tier" from all the online reading I have done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for your other question, I have no idea what a headless server is. I AM running it as a service though. I looked up a solution to this problem and found a forum thread where someone apparently found a way around this. His solution was creating a set of .bat files and starting up alfresco with those. Unfortunately, it didn't work for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 21:02:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275178#M228308</guid>
      <dc:creator>mando_alvarado_</dc:creator>
      <dc:date>2013-02-14T21:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275179#M228309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is strange, I never encountered root objects not being available in web script. You're on your own on that one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure as to why starting Alfresco through a .bat file does not work for you, do you get a concrete error? There's a setenv.bat file too, maybe it's setting environment variables to something that's not correct (had this issue once)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Feb 2013 22:39:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275179#M228309</guid>
      <dc:creator>lista</dc:creator>
      <dc:date>2013-02-17T22:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting username of the user who executed a repository tier web script</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275180#M228310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, after a few months, I stumbled upon a solution to this. I have no idea why this works, or what is going on under the hood, and frankly I don't care anymore. This was a stupid problem to have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that apparently you can't use &amp;lt;javascript&amp;gt;&amp;lt;transaction&amp;gt;none&amp;lt;/transaction&amp;gt;&amp;lt;/javascript&amp;gt; in your webscript desc file. If you do, you won't have access to certain root scope objects. I fixed it by using &amp;lt;javascript&amp;gt;&amp;lt;transaction&amp;gt;required&amp;lt;/transaction&amp;gt;&amp;lt;/javascript&amp;gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think this should be mentioned somewhere.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 23:13:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/getting-username-of-the-user-who-executed-a-repository-tier-web/m-p/275180#M228310</guid>
      <dc:creator>mando_alvarado_</dc:creator>
      <dc:date>2013-05-03T23:13:49Z</dc:date>
    </item>
  </channel>
</rss>

