[opencms-dev] User out of group? possible?

ambiesense at gmx.de ambiesense at gmx.de
Tue Nov 18 18:57:01 CET 2003


Hallo Matt,

thank you for providing your sourcecode but it seems not to solve my
question. To relate my question/request to your source example I would need a code
example of a program using your code. How can the a (web)user be created using
a default group, if I do not know additional info (the Hashtable).

I have this code line:

cmsObject.addUser("mylogin", "mypassword", null, null, null, 0);

which does not work since the OpenCMS is complaining not to know a null
group (which is true). Can I use a default group (if no group is known)? Is the
only flag one should use here the enable flag for the user(C_FLAG_ENABLED) and
how do I handle the fact that I do not want to store any additional user
info.

Maybe you can just provide me some working examples for the line aboth?

Also I look for an example if you want to add a new group, which has no
parent (possible?) like the code below:

addGroup("myGroup", "This is my group", ???FLAGS???,  ???NO PARENT BUT
HOW???)

Thank you,
Ralf


> ambiesense at gmx.de wrote:
> > Can I add a user which does not belong to any group (like
> > addUser("me","mypasswd",null,"")) ? 
> > 
> > If not how do I need to handle this? For example does OpenCMS has a
> > defaultgruop, which I have to use?
> 
> What group does Guest belong to?
> 
> I usually create a group that all of my users will belong to by default.
> 
> > Does anybody know where I can find more to read about implementation
> > specific (code example based) material to read about this?
> 
> I'm attaching a couple of classes that I use to create WebUsers (note 
> that to change the code from WebUsers to regular Users all you have to 
> do is change cms.addWebUser to cms.addUser) There's nothing particularly 
> special about any of the code... it's pretty straightforward.
> 
> I'm also including the password generation utility so that the password 
> code will make sense. If you need password generation stuff, you'll have 
> to download the jar (URL is in the code) from Ostermiller.org
> 
> > 
> > Does somebody has example programs / or parts to offer to get a start
> into
> > it?
> 
>  From the code I provided, all you need to do is create JSPs that 
> construct and use the classes. However, you may find it more beneficial 
> to use my code as a reference for your own use.
> 
> If anyone finds this code useful enough to post on the forums, feel free.
> 
> Matt
> 
> 
> 

-- 
GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen!

Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken
tolle Preise. http://www.gmx.net/de/cgi/specialmail/

+++ GMX - die erste Adresse für Mail, Message, More! +++




More information about the opencms-dev mailing list