<?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 Get Administrator password with JAVA in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130654#M91796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have developed a new wizard. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my program, I create a new administrator session.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;FacesContext context = FacesContext.getCurrentInstance();&lt;BR /&gt;ServiceRegistry serviceRegistry =&amp;nbsp; Repository.getServiceRegistry(context);&lt;BR /&gt;AuthenticationService authenticationService = serviceRegistry.getAuthenticationService();&lt;BR /&gt;authenticationService.authenticate("admin", "admin".toCharArray());&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I create a administrator session without writing the password of admin?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Luc&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2008 13:43:06 GMT</pubDate>
    <dc:creator>lmoulin</dc:creator>
    <dc:date>2008-01-25T13:43:06Z</dc:date>
    <item>
      <title>Get Administrator password with JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130654#M91796</link>
      <description>Hello,I have developed a new wizard. In my program, I create a new administrator session.See the following code:FacesContext context = FacesContext.getCurrentInstance();ServiceRegistry serviceRegistry =&amp;nbsp; Repository.getServiceRegistry(context);AuthenticationService authenticationService = serviceRegi</description>
      <pubDate>Fri, 25 Jan 2008 13:43:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130654#M91796</guid>
      <dc:creator>lmoulin</dc:creator>
      <dc:date>2008-01-25T13:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Administrator password with JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130655#M91797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not sure you can retrieve the admin username but you can make some code run as admin, it just depends on what you are trying to achieve as to whether its appropriate for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork&amp;lt;Object&amp;gt;()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; public Object doWork() throws Exception&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}, "admin");&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 12:38:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130655#M91797</guid>
      <dc:creator>gavinc</dc:creator>
      <dc:date>2008-01-29T12:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get Administrator password with JAVA</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130656#M91798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot It works fine&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 16:17:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/get-administrator-password-with-java/m-p/130656#M91798</guid>
      <dc:creator>lmoulin</dc:creator>
      <dc:date>2008-01-29T16:17:09Z</dc:date>
    </item>
  </channel>
</rss>

