<div dir="ltr">Dear GeoNode Users, <div><br></div><div>I'm using SPCGeonode 2.10 (Ubuntu 18.04). <br><br>I'm working with the LDAP configuration. Now I'm at the point that users of different LDAP groups can login into GeoNode and they are given staff or superuser privileges according to the LDAP group they belong to.<br><br>And this <a href="http://docs.geonode.org/en/2.10.x/advanced/contrib/#configuration">guide</a> is basically done thanks to: <br><br>```<br><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div>AUTH_LDAP_USER_FLAGS_BY_GROUP = {</div><div>    <span style="color:rgb(206,145,120)">'is_staff'</span>: [LDAPGROUP1],</div><div>    <span style="color:rgb(206,145,120)">'is_superuser'</span>: [LDAPGROUP2],</div><div>    <span style="color:rgb(206,145,120)">'is_active'</span>: [LDAPGROUP1, LDAPGROUP2]</div><div>}</div></div>``` <br><br>The problem is that the users are not inserted in the corresponding group. I've also tried to create the groups in geonode with the same name of the LDAP group, but nothing.<br><br>In the guide it's written:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(64,64,64);font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;font-size:16px;background-color:rgb(252,252,252)">Any groups that the user is a member of in LDAP (under the </span><code class="gmail-docutils gmail-literal gmail-notranslate" style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;max-width:100%;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:1px solid rgb(225,228,229);padding:2px 5px;color:rgb(231,76,60);overflow-x:auto"><span class="gmail-pre" style="box-sizing:border-box">cn=groups,dc=ad,dc=example,dc=org</span></code><span style="color:rgb(64,64,64);font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;font-size:16px;background-color:rgb(252,252,252)"> search base and belonging to one of </span><code class="gmail-docutils gmail-literal gmail-notranslate" style="box-sizing:border-box;font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",Courier,monospace;font-size:12px;white-space:nowrap;max-width:100%;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;border:1px solid rgb(225,228,229);padding:2px 5px;color:rgb(231,76,60);overflow-x:auto"><span class="gmail-pre" style="box-sizing:border-box">(|(cn=abt1)(cn=abt2)(cn=abt3)(cn=abt4)(cn=abt5)(cn=abt6))</span></code><span style="color:rgb(64,64,64);font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;font-size:16px;background-color:rgb(252,252,252)"> groups) will be mapped to the corresponding geonode groups, even creating these groups in geonode in case they do not exist yet. The geonode user is also made a member of these geonode groups.</span>    <br></blockquote></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(64,64,64);font-family:Lato,proxima-nova,"Helvetica Neue",Arial,sans-serif;font-size:16px;background-color:rgb(252,252,252)">You may also manually generate the geonode groups in advance, before users login. In this case, when a user logs in and the mapped LDAP group already exists, the user is merely added to the geonode group</span>  <br></blockquote><div><br>So I do expect this behavior. </div><div><br>  ```   <br><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div>AUTH_LDAP_GROUP_TYPE = GeonodeNestedGroupOfNamesType()</div><div><div style="line-height:19px"><div>GEONODE_LDAP_GROUP_NAME_ATTRIBUTE = <span style="color:rgb(206,145,120)">"cn"</span></div><div>GEONODE_LDAP_GROUP_PROFILE_FILTERSTR =<span style="color:rgb(206,145,120)">"(|(cn=ldapgroup1)(cn=ldapgroup2))"</span></div><div>GEONODE_LDAP_GROUP_PROFILE_MEMBER_ATTR = <span style="color:rgb(206,145,120)">"member"</span></div></div></div></div>  ```   <br></div><div><br></div><div>I've tested also GEONODE_LDAP_GROUP_PROFILE_MEMBER_ATTR = "uniqueMember"</div><div><br>Any ideas of what it can be? or how can I make some code testing for this part. <br><br>In the <a href="https://django-auth-ldap.readthedocs.io/en/latest/users.html#direct-attribute-access">django-auth-ldap </a>documentation, it is written about populating a user and it points out group_dns and group_names attributes. For this part as far as I understand the GeonodeNestedGroupOfNamesType() is in charge of along with the LDAPBackend (I've seen that there's a function <span style="color:rgb(220,220,170);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre">add_groups_to_user</span> ) ... How to test this?<br><br>Thanks in advance for your help,</div><div>Chiara<br><br></div><div><table cellspacing="0" cellpadding="0" border="0" style="color:rgb(136,136,136)"><tbody><tr><td valign="top" style="padding:8px 0px 0px"><span style="color:rgb(138,138,138);font-family:Roboto,sans-serif;font-size:8pt">.<br></span></td></tr></tbody></table></div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div></div></div></div></div></div></div>