<?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: custom webscript giving 500 Internal Error in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299950#M253080</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;BR /&gt;&lt;SPAN&gt;Thanks for your reply. To modify that functionality i have written the above webscript with the authentication as user and yes the user is non-admin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you please help me how i can add users to group with non-admin access?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nancy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2015 10:23:00 GMT</pubDate>
    <dc:creator>nancyaggarwal</dc:creator>
    <dc:date>2015-09-01T10:23:00Z</dc:date>
    <item>
      <title>custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299948#M253078</link>
      <description>Hi,I am integrating my application with alfresco using external authentication. now there is a need for adding logged in user to a group in alfresco and for that i have written webscript as below:AddUserToGroup.get.desc.xml&amp;lt;webscript&amp;gt; &amp;nbsp; &amp;lt;shortname&amp;gt;AddUserToGroup&amp;lt;/shortname&amp;gt; &amp;nbsp; &amp;lt;d</description>
      <pubDate>Tue, 01 Sep 2015 09:21:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299948#M253078</guid>
      <dc:creator>nancyaggarwal</dc:creator>
      <dc:date>2015-09-01T09:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299949#M253079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Nancy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As per the error you're getting, you have not the permission to modify the group in your &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;people.addAuthority(group,user)&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; line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding members to a group is an administrator's task, and I'm guessing the person logged in is not an admin or does not have admin rights to perform such an action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Trying logging in with Admin user and test, if that works then execute your webscript as admin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 09:57:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299949#M253079</guid>
      <dc:creator>darkredd</dc:creator>
      <dc:date>2015-09-01T09:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299950#M253080</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;BR /&gt;&lt;SPAN&gt;Thanks for your reply. To modify that functionality i have written the above webscript with the authentication as user and yes the user is non-admin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you please help me how i can add users to group with non-admin access?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nancy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 10:23:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299950#M253080</guid>
      <dc:creator>nancyaggarwal</dc:creator>
      <dc:date>2015-09-01T10:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299951#M253081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your Java class where you call the webscript, I am pretty sure it asks you to log in, in that instance use you admin credentials to login and then pass the user entity as a parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And if you do not have admin access, I cannot see you achieving that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 11:16:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299951#M253081</guid>
      <dc:creator>darkredd</dc:creator>
      <dc:date>2015-09-01T11:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299952#M253082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can't use admin credentials. I have to achieve this without admin credentials&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nancy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 11:34:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299952#M253082</guid>
      <dc:creator>nancyaggarwal</dc:creator>
      <dc:date>2015-09-01T11:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299953#M253083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello Nancy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of javascript controller you can have a java-backed controller for your webscript. And in that controller write below code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Authentication auth = AuthenticationUtil.getFullAuthentication();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AuthenticationUtil.setRunAsUserSystem();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// your code to set user in group&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AuthenticationUtil.clearCurrentSecurityContext();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AuthenticationUtil.setFullAuthentication(auth);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should not give permission error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 11:51:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299953#M253083</guid>
      <dc:creator>hardik1512</dc:creator>
      <dc:date>2015-09-01T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: custom webscript giving 500 Internal Error</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299954#M253084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Hardik for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying sudo script now for my query, if that doesn't work i'll try your solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nancy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2015 10:43:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/custom-webscript-giving-500-internal-error/m-p/299954#M253084</guid>
      <dc:creator>nancyaggarwal</dc:creator>
      <dc:date>2015-09-02T10:43:00Z</dc:date>
    </item>
  </channel>
</rss>

