Author Topic: HOWTO: Jabber configuration to hide "internal" groups in shared roster  (Read 4281 times)

rholighaus

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +6/-0
    • View Profile
A standard Zentyal 3.2 installation has lots of "internal" groups - I guess for Active Directory compatibility.
Unfortunately, those sort of mess up the Jabber roster.

To change settings, first create a custom template by copying /usr/share/zentyal/stubs/jabber/ejabberd.cfg.mas to /etc/zentyal/stubs/jabber/ejabberd.cfg.mas

Then edit the following section, altering the ldap_rfilter and ldap_gfilter lines:

% if ($sharedroster) {
  {mod_shared_roster_ldap, [
    {ldap_filter, ""},
    {ldap_rfilter, "(&(objectClass=posixGroup)(!(internal=1)))"},
    {ldap_gfilter, "(&(objectClass=posixGroup)(cn=%g)(!(internal=1)))"},

    {ldap_ufilter, "(&(uid=%u)(objectClass=userJabberAccount))"},
    {ldap_groupattr, "cn"},
    {ldap_groupdesc, "description"},
    {ldap_memberattr, "member"},
    {ldap_memberattr_format, "uid=%u,<% $usersDn %>"},
    {ldap_useruid, "uid"},
    {ldap_userdesc, "cn"}
  ]},


To make the changes effective, recreate the config files from the template and restart the jabber service:

  sudo /etc/init.d/zentyal jabber restart

Works like a charm for me and the Zarafa Webapp Chat windows is no longer clogged with groups that should be hidden.
« Last Edit: October 11, 2013, 03:17:51 pm by rholighaus »

christian

  • Guest
Re: Jabber configuration to hide "internal" groups in shared roster
« Reply #1 on: October 11, 2013, 02:41:23 pm »
Nice input !
This approach should be used elsewhere too (if not already done) so that only significant information is displayed.

RAB

  • Zen Apprentice
  • *
  • Posts: 42
  • Karma: +2/-0
    • View Profile
Modified this to read

% if ($sharedroster) {
  {mod_shared_roster_ldap, [
    {ldap_filter, ""},
    {ldap_rfilter, "(&(objectClass=posixGroup)(!(internal=1)))"},
    {ldap_gfilter, "(&(objectClass=posixGroup)(cn=%g)(cn=jabberusers)(!(internal=1)))"},
    {ldap_ufilter, "(&(uid=%u)(objectClass=userJabberAccount))"},
    {ldap_groupattr, "cn"},
    {ldap_groupdesc, "description"},
    {ldap_memberattr, "member"},
    {ldap_memberattr_format, "uid=%u,<% $usersDn %>"},
    {ldap_useruid, "uid"},
    {ldap_userdesc, "cn"}
  ]},

Now only the jabberusers group shows up.

Note that the group must have a description to show up in the shared roster.

michelineney

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
This is a really quality post. Can make a lot of people donotrealize thatother people have found and known as a sharedexperience around.

CNServices

  • Zen Monk
  • **
  • Posts: 75
  • Karma: +15/-0
    • View Profile
Thank you to rholighaus and RAB (and to michelineney for "bumping" it). I look forward to trying this tweak out.

Edit: Had to fix a user name typo.
« Last Edit: April 18, 2014, 03:30:42 pm by CNServices »

adymeblack

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Thanks for the how-to. Makes the roster a lot easier to deal with. However, I'm sure there is a way to limit who end users see depending on group memberships.

For example, i would like to set this up for my employees and their supervisors. I would like the supervisors to have the ability to talk to anyone, while the employees only have the ability to talk to the supervisors.....and not each other.

Can anyone either explain, or point me in the direction of where i can find how to do that?

Thanks!