Re: Need some osaccess directions/examples

"Ilja" <[email protected]> Sun, 12 Oct 2003 20:42:14 +0200
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
The com.opensymphony.module.access.provider.hibernate.HResourceProvider
and com.opensymphony.module.access.provider.osuser.OSUserUserProvider

I allready assumed they must exist, but how do you create and link them?
There's no 'createUser' or 'createGroup'-method in the accessmanager. Are
there concrete examples on osaccess usage?

Ilja

On Sun, 12 Oct 2003 11:38:04 -0500, [email protected] said:
> The user and group must exist. Which provider are you using?
> 
> SnowWolf
> 
> On Saturday, Oct 11, 2003, at 11:49 America/Indianapolis, Ilja wrote:
> 
> > Ok, I'm still trying to get osaccess working, however I'm not sure how.
> > Can you guys provide me with some basic example on how to create a  
> > group,
> > a user, a permission and associate them with eachother?
> >
> > This is now what I've got:
> >
> > public class OSAccessTest extends HttpServlet
> > {
> > 	public void doGet(HttpServletRequest request, HttpServletResponse  
> > response) throws IOException, ServletException
> > 	{
> > 		PrintWriter out = response.getWriter();
> > 		
> > 		try
> > 		{
> > 			AccessManager am = AccessManager.getInstance();
> > 		}
> > 		catch (Exception e)
> > 		{
> > 			// TODO Auto-generated catch block
> > 			e.printStackTrace(out);
> > 		}
> > 	}
> > }
> >
> > This works without errors, so I tried adding:
> >
> > am.addUserToGroup("Ilja", "Administrators");
> >
> > but now I get an error:
> >
> > java.lang.NullPointerException
> > 	at  
> > com.opensymphony.module.access.AccessManager.addUserToGroup(AccessManag 
> > er.java:842)
> > 	at  
> > com.opensymphony.module.access.AccessManager.addUserToGroup(AccessManag 
> > er.java:829)
> > 	at org.mathesis.test.OSAccessTest.doGet(OSAccessTest.java:35)
> >
> > Probably because the user and the group both don't exist?
> >
> > So how do I create them?
> >
> > Regards,
> >
> > Ilja
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > SourceForge.net hosts over 70,000 Open Source Projects.
> > See the people who have HELPED US provide better services:
> > Click here: http://sourceforge.net/supporters.php
> > _______________________________________________
> > Opensymphony-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers
> >
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Opensymphony-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers
> 


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php