<?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 add a user to a group with cURL ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-user-to-a-group-with-curl/m-p/324719#M11720</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&lt;B&gt;----- New additional remark at the bottom of the page... ----&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;My local group : g_toto&lt;BR /&gt;
My ldap user : titi&lt;BR /&gt;
My local powerusers user : puadmin&lt;BR /&gt;
My ldap administrator user : ldamin&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I tried to add the Titi user in the G_toto group and it works with Nuxeo/nxadmin &amp;gt; Admin Center &amp;gt; Users and Groups.&lt;/P&gt;
&lt;P&gt;If I create the group with cUrl and I directly adds the user, it also works :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group' -u puadmin:pupwd -H 'Content-Type: application/json'  -d '{ "entity-type": "group", "groupname":"g_toto","memberUsers": ["titi","tata"] , "memberGroups": ["alltxtx"] } '&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;But this seems not to work with Curl to add a new user.&lt;BR /&gt;
I tried multiple combinations :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/user/titi/group/g_toto' -u puadmin:pupwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; not authorized (powerusers)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group/g_toto/user/titi' -u puadmin:pupwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; not authorized (powerusers)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/user/titi/group/g_toto' -u ldadmin:ldpwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; no error, but titi is not in "g_toto" (administrator)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group/g_toto/user/titi' -u ldadmin:ldpwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; no error, but titi is not in "g_toto" (administrator)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Do you have an idea ?&lt;BR /&gt;
I used the API Playground samples...&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt; Additional remark :&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I create the group "g_tata" with cURL an with the Web interface, i add this group with reading's right at the folder "MyFolder" :&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I search g_tata and i click on "add" button&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;The group does not appear in the "Local rights" part, but Nuxeo still suggests save changes "Local rights" and when I click, it remains on the proposal but never "g_tata" will appear.&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Yet if I look at the acl with curl, everything is good :&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;curl -X POST 'http://mysite/.../Pilote.xxx/workspaces/MyFolder/@acl' -u puadmin:pupwd -H 'Content-Type: application/json' : &lt;BR /&gt;
&lt;I&gt;public 'name' =&amp;gt; string 'local' (length=5)&lt;BR /&gt;
public 'ace' =&amp;gt; &lt;BR /&gt;
array (size=2)&lt;BR /&gt;
0 =&amp;gt; &lt;BR /&gt;
object(stdClass)[243]&lt;BR /&gt;
public 'username' =&amp;gt; string '&lt;B&gt;g_tata&lt;/B&gt;' (length=6)&lt;BR /&gt;
.....&lt;BR /&gt;&lt;/I&gt;
&lt;BR /&gt;&lt;BR /&gt;
Thanks a lot&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 17 Dec 2014 10:20:37 GMT</pubDate>
    <dc:creator>paglop_</dc:creator>
    <dc:date>2014-12-17T10:20:37Z</dc:date>
    <item>
      <title>How to add a user to a group with cURL ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-user-to-a-group-with-curl/m-p/324719#M11720</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&lt;B&gt;----- New additional remark at the bottom of the page... ----&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;My local group : g_toto&lt;BR /&gt;
My ldap user : titi&lt;BR /&gt;
My local powerusers user : puadmin&lt;BR /&gt;
My ldap administrator user : ldamin&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I tried to add the Titi user in the G_toto group and it works with Nuxeo/nxadmin &amp;gt; Admin Center &amp;gt; Users and Groups.&lt;/P&gt;
&lt;P&gt;If I create the group with cUrl and I directly adds the user, it also works :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group' -u puadmin:pupwd -H 'Content-Type: application/json'  -d '{ "entity-type": "group", "groupname":"g_toto","memberUsers": ["titi","tata"] , "memberGroups": ["alltxtx"] } '&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;But this seems not to work with Curl to add a new user.&lt;BR /&gt;
I tried multiple combinations :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/user/titi/group/g_toto' -u puadmin:pupwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; not authorized (powerusers)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group/g_toto/user/titi' -u puadmin:pupwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; not authorized (powerusers)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/user/titi/group/g_toto' -u ldadmin:ldpwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; no error, but titi is not in "g_toto" (administrator)&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;curl -X POST 'http://mysite/nuxeo/api/v1/group/g_toto/user/titi' -u ldadmin:ldpwd -H 'Content-Type: application/json'&lt;BR /&gt;
=&amp;gt; no error, but titi is not in "g_toto" (administrator)&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Do you have an idea ?&lt;BR /&gt;
I used the API Playground samples...&lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;I&gt; Additional remark :&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I create the group "g_tata" with cURL an with the Web interface, i add this group with reading's right at the folder "MyFolder" :&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I search g_tata and i click on "add" button&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;The group does not appear in the "Local rights" part, but Nuxeo still suggests save changes "Local rights" and when I click, it remains on the proposal but never "g_tata" will appear.&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Yet if I look at the acl with curl, everything is good :&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;curl -X POST 'http://mysite/.../Pilote.xxx/workspaces/MyFolder/@acl' -u puadmin:pupwd -H 'Content-Type: application/json' : &lt;BR /&gt;
&lt;I&gt;public 'name' =&amp;gt; string 'local' (length=5)&lt;BR /&gt;
public 'ace' =&amp;gt; &lt;BR /&gt;
array (size=2)&lt;BR /&gt;
0 =&amp;gt; &lt;BR /&gt;
object(stdClass)[243]&lt;BR /&gt;
public 'username' =&amp;gt; string '&lt;B&gt;g_tata&lt;/B&gt;' (length=6)&lt;BR /&gt;
.....&lt;BR /&gt;&lt;/I&gt;
&lt;BR /&gt;&lt;BR /&gt;
Thanks a lot&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 17 Dec 2014 10:20:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-add-a-user-to-a-group-with-curl/m-p/324719#M11720</guid>
      <dc:creator>paglop_</dc:creator>
      <dc:date>2014-12-17T10:20:37Z</dc:date>
    </item>
  </channel>
</rss>

