jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Belrose <kafe...@gmail.com>
Subject On the topic of JackRabbit group management.
Date Fri, 12 Aug 2011 10:49:37 GMT
Hi all,

I am currently looking at leveraging the features of the JackRabbit
UserManager to be able to manage users, groups and give users
administrator privileges for my application.
First of all, is there an easy way to be able to list all users and
all groups that have been created on the system?
All the findAuthorizable methods on the UserManager are search
oriented, so all I can think of is writing a wildcard search query for
groups or users whose name is like *. Am I on the right track?

Also, it seems the Jackrabbit does not pre-create the administrators
group by default. Please see the following test snippet written in
Scala with ScalaTest. The test fails when trying to get the
authorizable corresponding to the ADMINSTRATORS_NAME group.
I guess I can just create that group and add a user to it, but is that
sufficient then to give that user all administrators privileges (i.e.
the right to create other users and groups, etc...). If not, what else
would I need to do?

      "The super user (i.e admin) should be able to create a user and
her to the administrators group" in {
    	  inSession(repository,superuser,password){session =>
    	    val um = session.getUserManager
    	    um.getAuthorizable(SecurityConstants.ADMINISTRATORS_NAME) match{
    	      case null => fail("The authorizable for the administrators
group does not exist.")
    	      case g : Group =>
    	        val newadmin = "newadmin"
    	      case _ => fail("The administrators authorizable is not a group")

I am using Jackrabbit core 2.2.0.

Many thanks in advance for your answers.

Guillaume Belrose.

View raw message