Guilherme,

Here Here! I'm glad somebody said it.

But without documentation, you should look at the archives to this list,
because many of these problems have already been worked out.

For example...it isn't said anywhere in the documentation, but the
EJBUserManager is the most useful device for ecommerce. With this, you can
automatically login users and create users  for your website...without one
call to the EJBUserManager stuff. In order to use this, you will have to add
the following to your orion-application.xml file:

        <user-manager class="com.evermind.ejb.EJBUserManager">
                 <property name="home" value="com.evermind.ejb.EJBUser" />
                 <property name="defaultGroups" value="users" />
        </user-manager>

I found this tidbit in the mail archive. Then you can use the role manager
to allow users access to ejb resources, and the role manager automatically
uses the your databank with cmp to create users....create a user like this:

try
{
RoleManager roleManager = (RoleManager)new
InitialContext().looku("java:comp/RoleManager");
if(roleManager.getPrincipal(username) != null)
                                throw new DuplicateAccountException(username)
Principal principal = roleManager.createPrincipal(username, password);
roleManager.addToRole(principal, role);
roleManager.store();
}
catch(NamingException e){}
catch(UserAlreadyExistsException e){}
catch(InstantiationException e){}
catch(IOException e){}

and like magic, a user database is created. Of course, you also have to make
sure your roles are part of your groups.

This is the great secret of orion...great stuff, no documentation! It took
me weeks to figure this out. I wish there was a tutorial on these simple
issues:

How do you login in a client through a database of usernames/passwords?
How do you enroll a client into a database of usernames/passwords?
How do you control access to web resources (ejb's, jsp's, servlets)?

The existing documentation on this is about as clear as mud.

Regards,

Lawrence




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Guilherme
Ceschiatti
Sent: Monday, September 18, 2000 1:58 PM
To: Orion-Interest
Subject: User/Group manager guide


Hi!

I'm almost leaving Orion because the lack of documentation, mainly about how
to
manage User/Groups. As many people have lots of doubts related to it too,
I'm
asking the Orion team or anybody else to write a tutorial about it.  I
really
don't want to leave Orion, because I've made good things on it, but I'm
spending a lot of time trying to "decifrate" how to use the Orion API.

Thanks.
Guilherme Ceschiatti
[EMAIL PROTECTED]


Reply via email to