[JDEV] Creating new users and Groups

Schuyler Heath sheath at jabber.org
Thu Jan 4 13:32:33 CST 2001


Hello,

On Thu, Jan 04, 2001 at 06:50:29PM -0500, Michael French wrote:
> 2.  I want to be able to create groups of users for different departments.
> I want to be able to push these groups out so that each users is not
> creating their own.  I don't mind them adding there own groups once they
> start using the system, I just want a couple of groups that are default and
> that everyone has.  How can I do this?

mod_groups allows you to do this.  mod_groups is in 1.4pre1, but isn't
loaded by default.  So you will have to add this line to your jsm <load/>
section:

<mod_groups>./jsm/jsm.so</mod_groups>

Make sure it is loaded before mod_roster and mod_presence.

By adding the following to your jsm config all users will have "Group
One" in their roster.

<jsm xmlns="xmlns="jabber:config:jsm">

  ...

  <groups>
    <group id="group1">
      <name>Group One</name>
      <require/>

      <users>
        <user jid='user at domain' name='User'/>
      </users/>

    </group>
  </groups>

  ...

</jsm>

You can create non-required groups by removing the <require/> flag.
mod_groups uses a new protocol extension called browsing, which no
client supports yet, but they should soon.  But until then, having
non-required groups is sort of useless, since they can't be browsed.

It is also possible to store the groups in XDB instead of the config.
This makes the group dynamic, so users can be added to the group without
changing your config.  I've started a document on the XDB backend protocol
which will be finished soon, if you're interested in writing a script
to do this.

Schuyler




More information about the JDev mailing list