You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:48:00 UTC

[sling-org-apache-sling-jcr-jackrabbit-usermanager] annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4 created (now 8750a76)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git.


      at 8750a76  (tag)
 tagging 66fec669d2ed532c7fa4a14d0063f1a79cf0b326 (commit)
      by Carsten Ziegeler
      on Sat Feb 13 20:07:03 2010 +0000

- Log -----------------------------------------------------------------
org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 8b60a66  SLING-875 add new jackrabbit-usermanager module (thanks Eric for providing)
     new 854533d  SLING-875: New Bundle for a ResourceProvider and Sling Post Operations for interacting with the jackrabbit UserManager https://issues.apache.org/jira/browse/SLING-875
     new 9b865b8  SLING-941: Lots of svn:eol-style settings missing
     new 2745b63  Use released version of jackrabbit api
     new 72ad816  Use jackrabbit api bundle instead of Sling's obsolete version.
     new 3164640  Use release parent pom
     new 87d5271  Use released version as dependencies.
     new e512ac0  [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.0-incubator
     new 70ae9d9  [maven-release-plugin] prepare for next development iteration
     new 38e866b  Use next dev version of parent pom
     new c2c00c8  Add missing licence, notice etc.
     new 8da015d  Prepare new release.
     new c7de9ac  [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
     new d17523d  [maven-release-plugin] prepare for next development iteration
     new 87eba80  Use next parent pom for development.
     new 3965a10  Set parent pom to released version.
     new a034d92  Formatting ...
     new 3a34397  SLING-995 Applying patch by Ian Boston (thanks)
     new 80ad2b5  Refactor everything below a "private" impl package. This clearly indicates that nothing contained in this bundle is intended to be exported.
     new 62307ef  Remove empty folder
     new 5fdd16c  Replace tabs by spaces, remove unneeded javadoc plugin configuration, remove empty bundle plugin configuration
     new b48249e  Move Sling to new TLP location
     new 1d4d4db  SLING-1011 : Remove disclaimer file.
     new 0884ed7  SLING-1011 : Adjust svn location
     new eea03d2  SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
     new 8048a2b  SLING-1016: Make membership management depend on the principal name not the URI of the principal, since the principal name is already unique. https://issues.apache.org/jira/browse/SLING-1016 Patch provided by Ian Boston.
     new 7a0d301  SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
     new be2ee7c  SLING-940 Applied patch from myself. Adds Javadoc to accessmanager and usermanager servlets.
     new 85ff313  SLING-1067 Fixed by checking the session cound to the request to see if its an administrator. If the user is an administrator they can register other users.
     new 3627954  Use official release instead of incubator release.
     new 0336ccc  Update to latest Sling releases.
     new 9166924  SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
     new 3e7a727  SLING-1208 As of Jackrabbit 1.6 the protected properties of the repository reflection of users and groups are not returned as Authorizable properties any more. Therefore the rep:principalName property which is checked in the integration test does not exist any longer. Likeweis the rep:password is not returned any more, so we have to use a (hacky) workaround.
     new d72e1f5  SLING-1208 Wrong commit, we should not re-add the rep:principalName property
     new a85b4aa  SLING-1208 Require Jackrabbit API 1.6 to be sure ...
     new a8f060f  Update notice files.
     new 1b53876  [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
     new 66fec66  [maven-scm] copy for tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4

The 38 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 06/28: Set parent pom to released version.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 3965a105f0a02bec5db98d8cd13804add17a90e4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 14 14:49:51 2009 +0000

    Set parent pom to released version.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@774798 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 06c60f2..7fadfae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.sling</groupId>
 		<artifactId>sling</artifactId>
-        <version>6-incubator-SNAPSHOT</version>
+        <version>5-incubator</version>
 		<relativePath>../../../parent/pom.xml</relativePath>
 	</parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 15/28: SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit eea03d2253ffbff6c69dd60eac9bdaf4ce994215
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 10:47:55 2009 +0000

    SLING-1011 : Remove disclaimer from readme's, adjust links to webite, fix versions in poms.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@786012 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 10 ----------
 pom.xml    |  2 +-
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/README.txt b/README.txt
index 10636b7..6599b2d 100644
--- a/README.txt
+++ b/README.txt
@@ -2,16 +2,6 @@ Apache Sling Jackrabbit UserManager Support
 
 Provides ResourceProvider and SlingPostOperations for the Jackrabbit UserManager.
 
-Disclaimer
-==========
-Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
-sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
-projects until a further review indicates that the infrastructure, communications,
-and decision making process have stabilized in a manner consistent with other
-successful ASF projects. While incubation status is not necessarily a reflection of
-the completeness or stability of the code, it does indicate that the project has yet
-to be fully endorsed by the ASF.
-
 Getting Started
 ===============
 
diff --git a/pom.xml b/pom.xml
index 421f477..e940862 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
     <packaging>bundle</packaging>
-    <version>2.0.3-incubator-SNAPSHOT</version>
+    <version>2.0.3-SNAPSHOT</version>
     <name>Apache Sling Jackrabbit UserManager Support</name>
     <description>
         Provides ResourceProvider and SlingPostOperations for the Jackrabbit

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 01/28: Add missing licence, notice etc.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit c2c00c86b5730c0cd12112d2119eab43eee1a1eb
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 6 12:48:17 2009 +0000

    Add missing licence, notice etc.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@772186 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/resources/META-INF/DISCLAIMER | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/main/resources/META-INF/DISCLAIMER b/src/main/resources/META-INF/DISCLAIMER
new file mode 100644
index 0000000..90850c2
--- /dev/null
+++ b/src/main/resources/META-INF/DISCLAIMER
@@ -0,0 +1,7 @@
+Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
+sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
+projects until a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent with other
+successful ASF projects. While incubation status is not necessarily a reflection of
+the completeness or stability of the code, it does indicate that the project has yet
+to be fully endorsed by the ASF.
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 17/28: SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 7a0d301cd8fb5a435fa58d28b6655371762b031b
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Sun Jul 5 11:27:40 2009 +0000

    SLING-1033 Upgrade to Sling parent POM 6 (and ensure web app has the leglize stuff, too)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@791223 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e940862..4fd957e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>5-incubator</version>
+        <version>6</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 02/28: Prepare new release.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 8da015dc930ce7ebc3dfa89af4fa8f456c84cae8
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 6 12:55:51 2009 +0000

    Prepare new release.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@772191 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c22d4da..5db5fc4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.sling</groupId>
 		<artifactId>sling</artifactId>
-		<version>6-incubator-SNAPSHOT</version>
+        <version>5-incubator</version>
 		<relativePath>../../../parent/pom.xml</relativePath>
 	</parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 21/28: Update to latest Sling releases.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 0336ccc56c1fca0723db8d5b88ffbebf25566393
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Oct 6 06:19:55 2009 +0000

    Update to latest Sling releases.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@822144 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index e7f748a..1c26098 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.0.6</version>
+            <version>2.0.8</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 04/28: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit d17523d033b593a7ad3378895a8c30f0439b3dde
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 6 13:16:02 2009 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@772222 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index b56815e..7fadfae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
 	<artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
 	<packaging>bundle</packaging>
-	<version>2.0.2-incubator</version>
+	<version>2.0.3-incubator-SNAPSHOT</version>
 	<name>Apache Sling Jackrabbit UserManager Support</name>
 	<description>
 		Provides ResourceProvider and SlingPostOperations for the Jackrabbit
@@ -38,13 +38,13 @@
 
 	<scm>
 		<connection>
-			scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
+			scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
 		</connection>
 		<developerConnection>
-			scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
+			scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
 		</developerConnection>
 		<url>
-			http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
+			http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
 		</url>
 	</scm>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 28/28: [maven-scm] copy for tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 66fec669d2ed532c7fa4a14d0063f1a79cf0b326
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sat Feb 13 20:07:03 2010 +0000

    [maven-scm] copy for tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.4@909884 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 24/28: SLING-1208 Wrong commit, we should not re-add the rep:principalName property

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit d72e1f5800e90b27f57943294042522d15a34db4
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Wed Dec 2 13:57:56 2009 +0000

    SLING-1208 Wrong commit, we should not re-add the rep:principalName property
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@886146 13f79535-47bb-0310-9956-ffa450edef68
---
 .../impl/resource/AuthorizableValueMap.java        | 26 ++--------------------
 1 file changed, 2 insertions(+), 24 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
index f93834e..c6996c0 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
@@ -44,14 +44,6 @@ import org.slf4j.LoggerFactory;
 public class AuthorizableValueMap implements ValueMap {
     private Logger logger = LoggerFactory.getLogger(AuthorizableValueMap.class);
 
-    /**
-     * Principal Name property of the Authorizable. This has been returned
-     * before Jackrabbit 1.6 as part of the Authorizable properties but is
-     * now removed from the set. We add this to the properties again to be
-     * able to convey this data to the request.
-     */
-    private static final String REP_PRINCIPAL_NAME = "rep:principalName";
-
     private boolean fullyRead;
 
     private final Map<String, Object> cache;
@@ -142,17 +134,9 @@ public class AuthorizableValueMap implements ValueMap {
         }
 
         try {
-            final Object value;
-            if (REP_PRINCIPAL_NAME.equals(key)) {
-                value = authorizable.getPrincipal().getName();
-            } else  if (authorizable.hasProperty(key)) {
+            if (authorizable.hasProperty(key)) {
                 final Value[] property = authorizable.getProperty(key);
-                value = valuesToJavaObject(property);
-            } else {
-                value = null;
-            }
-
-            if (value != null) {
+                final Object value = valuesToJavaObject(property);
                 cache.put(key, value);
                 return value;
             }
@@ -193,12 +177,6 @@ public class AuthorizableValueMap implements ValueMap {
                     }
                 }
 
-                // add principal name
-                if (!cache.containsKey(REP_PRINCIPAL_NAME)) {
-                    cache.put(REP_PRINCIPAL_NAME,
-                        authorizable.getPrincipal().getName());
-                }
-
                 fullyRead = true;
             } catch (RepositoryException re) {
                 // TODO: log !!

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 16/28: SLING-1016: Make membership management depend on the principal name not the URI of the principal, since the principal name is already unique. https://issues.apache.org/jira/browse/SLING-1016 Patch provided by Ian Boston.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 8048a2b2f61f3f31c44591d78f3592539b762e5c
Author: Juan Vazquez <jv...@apache.org>
AuthorDate: Mon Jun 22 12:10:43 2009 +0000

    SLING-1016: Make membership management depend on the principal name not the URI of the principal, since the principal name is already unique.
    https://issues.apache.org/jira/browse/SLING-1016
    Patch provided by Ian Boston.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@787214 13f79535-47bb-0310-9956-ffa450edef68
---
 .../impl/post/AbstractGroupPostServlet.java        | 52 ++++++++++++++++------
 1 file changed, 38 insertions(+), 14 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
index d70cb24..57b9dc3 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
@@ -19,13 +19,16 @@ package org.apache.sling.jackrabbit.usermanager.impl.post;
 import java.util.List;
 
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
+import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
+import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
@@ -56,19 +59,19 @@ public abstract class AbstractGroupPostServlet extends
             ResourceResolver resolver = request.getResourceResolver();
             Resource baseResource = request.getResource();
             boolean changed = false;
+            
+            UserManager userManager = AccessControlUtil.getUserManager(resolver.adaptTo(Session.class));
 
             // first remove any members posted as ":member@Delete"
             String[] membersToDelete = request.getParameterValues(SlingPostConstants.RP_PREFIX
                 + "member" + SlingPostConstants.SUFFIX_DELETE);
             if (membersToDelete != null) {
                 for (String member : membersToDelete) {
-                    Resource res = resolver.getResource(baseResource, member);
-                    if (res != null) {
-                        Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
-                        if (memberAuthorizable != null) {
-                            group.removeMember(memberAuthorizable);
-                            changed = true;
-                        }
+                    
+                    Authorizable memberAuthorizable = getAuthorizable(baseResource, member,userManager,resolver);
+                    if (memberAuthorizable != null) {
+                        group.removeMember(memberAuthorizable);
+                        changed = true;
                     }
 
                 }
@@ -79,13 +82,10 @@ public abstract class AbstractGroupPostServlet extends
                 + "member");
             if (membersToAdd != null) {
                 for (String member : membersToAdd) {
-                    Resource res = resolver.getResource(baseResource, member);
-                    if (res != null) {
-                        Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
-                        if (memberAuthorizable != null) {
-                            group.addMember(memberAuthorizable);
-                            changed = true;
-                        }
+                    Authorizable memberAuthorizable = getAuthorizable(baseResource, member,userManager,resolver);
+                    if (memberAuthorizable != null) {
+                        group.addMember(memberAuthorizable);
+                        changed = true;
                     }
                 }
             }
@@ -98,4 +98,28 @@ public abstract class AbstractGroupPostServlet extends
         }
     }
 
+    /**
+     * Gets the member, assuming its a principal name, failing that it assumes it a path to the resource.
+     * @param member the token pointing to the member, either a name or a uri
+     * @param userManager the user manager for this request.
+     * @param resolver the resource resolver for this request.
+     * @return the authorizable, or null if no authorizable was found.
+     */
+    private Authorizable getAuthorizable(Resource baseResource, String member, UserManager userManager,
+        ResourceResolver resolver) {
+      Authorizable memberAuthorizable = null;
+      try {
+        memberAuthorizable = userManager.getAuthorizable(member);
+      } catch (RepositoryException e) {
+        // if we can't find the members then it may be resolvable as a resource.
+      }
+      if ( memberAuthorizable == null ) {
+          Resource res = resolver.getResource(baseResource, member);
+          if (res != null) {
+              memberAuthorizable = res.adaptTo(Authorizable.class);
+          }
+      }
+      return memberAuthorizable;
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 18/28: SLING-940 Applied patch from myself. Adds Javadoc to accessmanager and usermanager servlets.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit be2ee7c7a9f6bd4fff27e8fc6ab7acdb75669ffd
Author: Ian Boston <ie...@apache.org>
AuthorDate: Thu Jul 16 16:54:39 2009 +0000

    SLING-940
    Applied patch from myself.
    Adds Javadoc to accessmanager and usermanager servlets.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@794751 13f79535-47bb-0310-9956-ffa450edef68
---
 .../impl/post/ChangeUserPasswordServlet.java       | 40 +++++++++++++++++--
 .../usermanager/impl/post/CreateGroupServlet.java  | 38 +++++++++++++++++-
 .../usermanager/impl/post/CreateUserServlet.java   | 46 +++++++++++++++++++---
 .../impl/post/DeleteAuthorizableServlet.java       | 37 +++++++++++++++--
 .../usermanager/impl/post/UpdateGroupServlet.java  | 39 +++++++++++++++++-
 .../usermanager/impl/post/UpdateUserServlet.java   | 40 ++++++++++++++++++-
 6 files changed, 223 insertions(+), 17 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index a4c6d22..1cd0c79 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -31,9 +31,43 @@ import org.apache.sling.api.servlets.HtmlResponse;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating the password of a user in
- * the jackrabbit UserManager.
- * 
+ * <p>
+ * Changes the password associated with a user. a new group. Maps on to nodes of resourceType <code>sling/groups</code> like
+ * <code>/rep:system/rep:userManager/rep:users/ae/fd/3e/ieb</code> mapped to a resource url
+ * <code>/system/userManager/user/ieb</code>. This servlet responds at
+ * <code>/system/userManager/user/ieb.changePassword.create.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>oldPwd</dt>
+ * <dd>The current password for the user (required)</dd>
+ * <dt>newPwd</dt>
+ * <dd>The new password for the user (required)</dd>
+ * <dt>newPwdConfirm</dt>
+ * <dd>The confirm new password for the user (required)</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Sucess sent with no body</dd>
+ * <dt>404</dt>
+ * <dd>If the user was not found.</dd>
+ * <dt>500</dt>
+ * <dd>Failure, including group already exists. HTML explains the failure.</dd>
+ * </dl>
+ * <h4>Example</h4>
+ *
+ * <code>
+ * curl -FoldPwd=oldpassword -FnewPwd=newpassword =FnewPwdConfirm=newpassword http://localhost:8080/system/userManager/user/ieb.changePassword.html
+ * </code>
+ *
+ * <h4>Notes</h4>
+ *
+ *
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/user"
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
index 17d89e3..cc87d05 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
@@ -35,8 +35,42 @@ import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
 /**
- * Sling Post Servlet implementation for creating a group in the jackrabbit
- * UserManager.
+ * <p>
+ * Sling Post Servlet implementation for creating a group in the jackrabbit UserManager.
+ * </p>
+ * <h2>Rest Service Description</h2>
+ * <p>
+ * Creates a new group. Maps on to nodes of resourceType <code>sling/groups</code> like
+ * <code>/rep:system/rep:userManager/rep:groups</code> mapped to a resource url
+ * <code>/system/userManager/group</code>. This servlet responds at
+ * <code>/system/userManager/group.create.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>:name</dt>
+ * <dd>The name of the new group (required)</dd>
+ * <dt>*</dt>
+ * <dd>Any additional parameters become properties of the group node (optional)</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Success, a redirect is sent to the group resource locator. The redirect comes with
+ * HTML describing the status.</dd>
+ * <dt>500</dt>
+ * <dd>Failure, including group already exists. HTML explains the failure.</dd>
+ * </dl>
+ * <h4>Example</h4>
+ * 
+ * <code>
+ * curl -F:name=newGroupA  -Fproperty1=value1 http://localhost:8080/system/userManager/group.create.html
+ * </code>
+ * 
+ * <h4>Notes</h4>
  * 
  * @scr.component immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index 20135b1..ca62a85 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -39,9 +39,45 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Sling Post Servlet implementation for creating a user in the jackrabbit
- * UserManager.
- * 
+ * <p>
+ * Sling Post Servlet implementation for creating a user in the jackrabbit UserManager.
+ * </p>
+ * <h2>Rest Service Description</h2>
+ * <p>
+ * Creates a new user. Maps on to nodes of resourceType <code>sling/users</code> like
+ * <code>/rep:system/rep:userManager/rep:users</code> mapped to a resource url
+ * <code>/system/userManager/user</code>. This servlet responds at <code>/system/userManager/user.create.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>:name</dt>
+ * <dd>The name of the new user (required)</dd>
+ * <dt>:pwd</dt>
+ * <dd>The password of the new user (required)</dd>
+ * <dt>:pwdConfirm</dt>
+ * <dd>The password of the new user (required)</dd>
+ * <dt>*</dt>
+ * <dd>Any additional parameters become properties of the user node (optional)</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Success, a redirect is sent to the users resource locator. The redirect comes with
+ * HTML describing the status.</dd>
+ * <dt>500</dt>
+ * <dd>Failure, including user already exists. HTML explains the failure.</dd>
+ * </dl>
+ * <h4>Example</h4>
+ *
+ * <code>
+ * curl -F:name=ieb -Fpwd=password -FpwdConfirm=password -Fproperty1=value1 http://localhost:8080/system/userManager/user.create.html
+ * </code>
+ *
+ *
  * @scr.component immediate="true" label="%createUser.post.operation.name"
  *                description="%createUser.post.operation.description"
  * @scr.service interface="javax.servlet.Servlet"
@@ -70,7 +106,7 @@ public class CreateUserServlet extends AbstractUserPostServlet {
 
     /**
      * The JCR Repository we access to resolve resources
-     * 
+     *
      * @scr.reference
      */
     private SlingRepository repository;
@@ -104,7 +140,7 @@ public class CreateUserServlet extends AbstractUserPostServlet {
 
     /**
      * Activates this component.
-     * 
+     *
      * @param componentContext The OSGi <code>ComponentContext</code> of this
      *            component.
      */
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
index c7fd71c..72b9921 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
@@ -33,9 +33,40 @@ import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
 /**
- * Sling Post Operation implementation for deleting one or more users and/or
- * groups from the jackrabbit UserManager.
+ 
+ * <h2>Rest Service Description</h2>
+ * <p>
+ * Deletes an Authorizable, currently a user or a group. Maps on to nodes of resourceType <code>sling/users</code> or <code>sling/users</code> like
+ * <code>/rep:system/rep:userManager/rep:users</code> or <code>/rep:system/rep:userManager/rep:groups</code> mapped to a resource url
+ * <code>/system/userManager/user</code> or <code>/system/userManager/group</code>. This servlet responds at
+ * <code>/system/userManager/user.delete.html</code> or <code>/system/userManager/group.delete.html</code>.
+ * The servlet also responds to single delete requests eg <code>/system/userManager/group/newGroup.delete.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>:applyTo</dt>
+ * <dd>An array of relative resource references to Authorizables to be deleted, if this parameter is present, the url is ignored and all the Authorizables in the list are removed.</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Success, no body.</dd>
+ * <dt>404</dt>
+ * <dd>The resource was not found</dd>
+ * <dt>500</dt>
+ * <dd>Failure</dd>
+ * </dl>
+ * <h4>Example</h4>
  * 
+ * <code>
+ * curl -Fgo=1 http://localhost:8080/system/userManager/user/ieb.delete.html
+ * </code>
+ *
+ *
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" values.0="sling/user"
@@ -90,7 +121,7 @@ public class DeleteAuthorizableServlet extends AbstractAuthorizablePostServlet {
      * set with valid resources an empty iterator is returned. Any resources
      * addressed in the {@link SlingPostConstants#RP_APPLY_TO} parameter is
      * ignored.
-     * 
+     *
      * @param request The <code>SlingHttpServletRequest</code> object used to
      *            get the {@link SlingPostConstants#RP_APPLY_TO} parameter.
      * @return The iterator of resources listed in the parameter or
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
index 7354d23..42a7971 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
@@ -31,9 +31,44 @@ import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating a group in the jackrabbit
- * UserManager.
+ * <p>
+ * Sling Post Operation implementation for updating a group in the 
+ * jackrabbit UserManager.
+ * </p>
+ * <h2>Rest Service Description</h2>
+ * <p>
+ * Updates a group's properties. Maps on to nodes of resourceType <code>sling/groups</code> like
+ * <code>/rep:system/rep:userManager/rep:groups/ae/3f/ed/testGroup</code> mapped to a resource url
+ * <code>/system/userManager/group/testGroup</code>. This servlet responds at
+ * <code>/system/userManager/group/testGroup.update.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>*</dt>
+ * <dd>Any additional parameters become properties of the group node (optional)</dd>
+ * <dt>*@Delete</dt>
+ * <dd>The property is deleted, eg prop1@Delete</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Success, a redirect is sent to the group's resource locator. The redirect comes with
+ * HTML describing the status.</dd>
+ * <dt>404</dt>
+ * <dd>The resource was not found</dd>
+ * <dt>500</dt>
+ * <dd>Failure</dd>
+ * </dl>
+ * <h4>Example</h4>
  * 
+ * <code>
+ * curl -Fprop1=value2 -Fproperty1=value1 http://localhost:8080/system/userManager/group/testGroup.update.html
+ * </code>
+ *
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" values="sling/group"
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
index b896eb1..3d60769 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
@@ -31,9 +31,45 @@ import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating a user in the jackrabbit
- * UserManager.
+ * <p>
+ * Sling Post Operation implementation for updating a user in the jackrabbit UserManager.
+ * </p>
+ * <h2>Rest Service Description</h2>
+ * <p>
+ * Updates a users properties. Maps on to nodes of resourceType <code>sling/users</code> like
+ * <code>/rep:system/rep:userManager/rep:users</code> mapped to a resource url
+ * <code>/system/userManager/user/ieb</code>. This servlet responds at
+ * <code>/system/userManager/user/ieb.update.html</code>
+ * </p>
+ * <h4>Methods</h4>
+ * <ul>
+ * <li>POST</li>
+ * </ul>
+ * <h4>Post Parameters</h4>
+ * <dl>
+ * <dt>*</dt>
+ * <dd>Any additional parameters become properties of the user node (optional)</dd>
+ * <dt>*@Delete</dt>
+ * <dd>Delete the property eg prop3@Delete means prop3 will be deleted (optional)</dd>
+ * </dl>
+ * <h4>Response</h4>
+ * <dl>
+ * <dt>200</dt>
+ * <dd>Success, a redirect is sent to the users resource locator. The redirect comes with
+ * HTML describing the status.</dd>
+ * <dt>404</dt>
+ * <dd>The resource was not found</dd>
+ * <dt>500</dt>
+ * <dd>Failure</dd>
+ * </dl>
+ * <h4>Example</h4>
  * 
+ * <code>
+ * curl -Fprop1=value2 -Fproperty1=value1 http://localhost:8080/system/userManager/user/ieb.update.html
+ * </code>
+ * 
+ *
+ *
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/user"

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 25/28: SLING-1208 Require Jackrabbit API 1.6 to be sure ...

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit a85b4aa853d3947fb272c1f88a4781130eb9856b
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Wed Dec 2 14:51:29 2009 +0000

    SLING-1208 Require Jackrabbit API 1.6 to be sure ...
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@886163 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index 55b1ca1..70948a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,7 +87,7 @@
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-api</artifactId>
-            <version>1.5.0</version>
+            <version>1.6.0</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -95,11 +95,6 @@
             <version>2.0.4-incubator</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.jackrabbit</groupId>
-            <artifactId>jackrabbit-api</artifactId>
-            <version>1.5.0</version>
-        </dependency>
-        <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 07/28: Formatting ...

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit a034d92f8b4fed4d4acdd969846cc50fa1fda6bb
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Jun 9 10:16:54 2009 +0000

    Formatting ...
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@782945 13f79535-47bb-0310-9956-ffa450edef68
---
 .../post/AbstractAuthorizablePostServlet.java      | 352 +++++++++++----------
 .../usermanager/post/AbstractGroupPostServlet.java | 108 ++++---
 .../usermanager/post/AbstractUserPostServlet.java  |  25 +-
 .../post/ChangeUserPasswordServlet.java            | 132 ++++----
 .../usermanager/post/CreateGroupServlet.java       | 110 ++++---
 .../usermanager/post/CreateUserServlet.java        | 169 +++++-----
 .../post/DeleteAuthorizableServlet.java            |  55 ++--
 .../usermanager/post/UpdateGroupServlet.java       |  90 +++---
 .../usermanager/post/UpdateUserServlet.java        |  80 ++---
 .../usermanager/post/impl/DateParser.java          |  31 +-
 .../usermanager/post/impl/RequestProperty.java     |  35 +-
 .../usermanager/resource/AuthorizableResource.java | 144 +++++----
 .../resource/AuthorizableResourceProvider.java     | 343 +++++++++++---------
 .../usermanager/resource/AuthorizableValueMap.java | 168 +++++-----
 14 files changed, 984 insertions(+), 858 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java
index ab1d5cf..412d0f2 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java
@@ -54,12 +54,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Base class for all the POST servlets for the UserManager operations 
+ * Base class for all the POST servlets for the UserManager operations
  */
-public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsServlet {
-	private static final long serialVersionUID = -5918670409789895333L;
+public abstract class AbstractAuthorizablePostServlet extends
+        SlingAllMethodsServlet {
+    private static final long serialVersionUID = -5918670409789895333L;
 
-	/**
+    /**
      * default log
      */
     private final Logger log = LoggerFactory.getLogger(getClass());
@@ -71,9 +72,9 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
      *               values.4="dd.MM.yyyy HH:mm:ss" values.5="dd.MM.yyyy"
      */
     private static final String PROP_DATE_FORMAT = "servlet.post.dateFormats";
-	
-	private DateParser dateParser;
-	
+
+    private DateParser dateParser;
+
     // ---------- SCR Integration ----------------------------------------------
 
     protected void activate(ComponentContext context) {
@@ -89,15 +90,18 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
     protected void deactivate(ComponentContext context) {
         dateParser = null;
     }
-	
-    
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.servlets.SlingAllMethodsServlet#doPost(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse)
-	 */
-	@Override
-	protected void doPost(SlingHttpServletRequest request,
-			SlingHttpServletResponse httpResponse) throws ServletException,
-			IOException {
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.api.servlets.SlingAllMethodsServlet#doPost(org.apache
+     * .sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.SlingHttpServletResponse)
+     */
+    @Override
+    protected void doPost(SlingHttpServletRequest request,
+            SlingHttpServletResponse httpResponse) throws ServletException,
+            IOException {
         // prepare the response
         HtmlResponse htmlResponse = new HtmlResponse();
         htmlResponse.setReferer(request.getHeader("referer"));
@@ -112,30 +116,45 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
         // parent location
         path = ResourceUtil.getParent(path);
         if (path != null) {
-        	htmlResponse.setParentLocation(externalizePath(request, path));
+            htmlResponse.setParentLocation(externalizePath(request, path));
         }
 
         Session session = request.getResourceResolver().adaptTo(Session.class);
 
         final List<Modification> changes = new ArrayList<Modification>();
-        
+
         try {
             handleOperation(request, htmlResponse, changes);
-            
-            //TODO: maybe handle SlingAuthorizablePostProcessor handlers here
-            
+
+            // TODO: maybe handle SlingAuthorizablePostProcessor handlers here
+
             // set changes on html response
-            for(Modification change : changes) {
-                switch ( change.getType() ) {
-                    case MODIFY : htmlResponse.onModified(change.getSource()); break;
-                    case DELETE : htmlResponse.onDeleted(change.getSource()); break;
-                    case MOVE :   htmlResponse.onMoved(change.getSource(), change.getDestination()); break;
-                    case COPY :   htmlResponse.onCopied(change.getSource(), change.getDestination()); break;
-                    case CREATE : htmlResponse.onCreated(change.getSource()); break;
-                    case ORDER : htmlResponse.onChange("ordered", change.getSource(), change.getDestination()); break;
+            for (Modification change : changes) {
+                switch (change.getType()) {
+                    case MODIFY:
+                        htmlResponse.onModified(change.getSource());
+                        break;
+                    case DELETE:
+                        htmlResponse.onDeleted(change.getSource());
+                        break;
+                    case MOVE:
+                        htmlResponse.onMoved(change.getSource(),
+                            change.getDestination());
+                        break;
+                    case COPY:
+                        htmlResponse.onCopied(change.getSource(),
+                            change.getDestination());
+                        break;
+                    case CREATE:
+                        htmlResponse.onCreated(change.getSource());
+                        break;
+                    case ORDER:
+                        htmlResponse.onChange("ordered", change.getSource(),
+                            change.getDestination());
+                        break;
                 }
             }
-            
+
             if (session.hasPendingChanges()) {
                 session.save();
             }
@@ -157,7 +176,7 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
                     e.getMessage(), e);
             }
         }
-        
+
         // check for redirect URL if processing succeeded
         if (htmlResponse.isSuccessful()) {
             String redirect = getRedirectUrl(request, htmlResponse);
@@ -169,22 +188,22 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
 
         // create a html response and send if unsuccessful or no redirect
         htmlResponse.send(httpResponse, isSetStatus(request));
-	}
-
-	/**
-	 * Extending Servlet should implement this operation to do the work
-	 * 
-	 * @param request the sling http request to process
-	 * @param htmlResponse the response 
-	 * @param changes 
-	 */
-	abstract protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes) throws RepositoryException;
-	
-	
+    }
+
+    /**
+     * Extending Servlet should implement this operation to do the work
+     * 
+     * @param request the sling http request to process
+     * @param htmlResponse the response
+     * @param changes
+     */
+    abstract protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse htmlResponse, List<Modification> changes)
+            throws RepositoryException;
+
     /**
      * compute redirect URL (SLING-126)
-     *
+     * 
      * @param ctx the post processor
      * @return the redirect location or <code>null</code>
      */
@@ -255,17 +274,15 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
             SlingPostConstants.RP_STATUS);
         return true;
     }
-	
-    
-    
-    // ------ The methods below are based on the private methods from the ModifyOperation class -----
-    
+
+    // ------ The methods below are based on the private methods from the
+    // ModifyOperation class -----
+
     /**
      * Collects the properties that form the content to be written back to the
-     * repository. 
+     * repository. NOTE: In the returned map, the key is the property name not a
+     * path.
      * 
-     * NOTE: In the returned map, the key is the property name not a path.
-     *
      * @throws RepositoryException if a repository error occurs
      * @throws ServletException if an internal error occurs
      */
@@ -295,13 +312,14 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
             // ensure the paramName is an absolute property name
             String propPath;
             if (paramName.startsWith("./")) {
-            	propPath = paramName.substring(2);
+                propPath = paramName.substring(2);
             } else {
-            	propPath = paramName;
+                propPath = paramName;
             }
             if (propPath.indexOf('/') != -1) {
-            	//only one path segment is valid here, so this paramter can't be used.
-            	continue; //skip it.
+                // only one path segment is valid here, so this paramter can't
+                // be used.
+                continue; // skip it.
             }
 
             // @TypeHint example
@@ -374,7 +392,7 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
             // causes the JCR Text property to be set by moving the /tmp/path
             // property to Text.
             if (propPath.endsWith(SlingPostConstants.SUFFIX_MOVE_FROM)) {
-            	//don't support @MoveFrom here
+                // don't support @MoveFrom here
                 continue;
             }
 
@@ -384,7 +402,7 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
             // causes the JCR Text property to be set by copying the /tmp/path
             // property to Text.
             if (propPath.endsWith(SlingPostConstants.SUFFIX_COPY_FROM)) {
-            	//don't support @CopyFrom here
+                // don't support @CopyFrom here
                 continue;
             }
 
@@ -396,13 +414,12 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
 
         return reqProperties;
     }
-	
-	
+
     /**
      * Returns the request property for the given property path. If such a
      * request property does not exist yet it is created and stored in the
      * <code>props</code>.
-     *
+     * 
      * @param props The map of already seen request properties.
      * @param paramName The absolute path of the property including the
      *            <code>suffix</code> to be looked up.
@@ -425,14 +442,14 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
 
         return prop;
     }
-    
-    
+
     /**
      * Removes all properties listed as {@link RequestProperty#isDelete()} from
      * the authorizable.
-     *
-     * @param authorizable The <code>org.apache.jackrabbit.api.security.user.Authorizable</code> 
-     * 				that should have properties deleted.
+     * 
+     * @param authorizable The
+     *            <code>org.apache.jackrabbit.api.security.user.Authorizable</code>
+     *            that should have properties deleted.
      * @param reqProperties The map of request properties to check for
      *            properties to be removed.
      * @param response The <code>HtmlResponse</code> to be updated with
@@ -440,30 +457,29 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
      * @throws RepositoryException Is thrown if an error occurrs checking or
      *             removing properties.
      */
-    protected void processDeletes(Authorizable resource, 
+    protected void processDeletes(Authorizable resource,
             Map<String, RequestProperty> reqProperties,
             List<Modification> changes) throws RepositoryException {
 
         for (RequestProperty property : reqProperties.values()) {
             if (property.isDelete()) {
-            	if (resource.hasProperty(property.getName())) {
-            		resource.removeProperty(property.getName());
+                if (resource.hasProperty(property.getName())) {
+                    resource.removeProperty(property.getName());
                     changes.add(Modification.onDeleted(property.getPath()));
-            	}
+                }
             }
         }
     }
 
-    
     /**
      * Writes back the content
-     *
+     * 
      * @throws RepositoryException if a repository error occurs
      * @throws ServletException if an internal error occurs
      */
     protected void writeContent(Session session, Authorizable authorizable,
-            Map<String, RequestProperty> reqProperties, List<Modification> changes)
-            throws RepositoryException {
+            Map<String, RequestProperty> reqProperties,
+            List<Modification> changes) throws RepositoryException {
 
         for (RequestProperty prop : reqProperties.values()) {
             if (prop.hasValues()) {
@@ -474,45 +490,47 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
                 }
                 if (authorizable.isGroup()) {
                     if (prop.getName().equals("groupId")) {
-                    	//skip these
-                    	continue;
-                	}                	
+                        // skip these
+                        continue;
+                    }
                 } else {
-                    if (prop.getName().equals("userId") ||
-                    		prop.getName().equals("pwd") ||
-                    		prop.getName().equals("pwdConfirm")) {
-                    	//skip these
-                    	continue;
+                    if (prop.getName().equals("userId")
+                        || prop.getName().equals("pwd")
+                        || prop.getName().equals("pwdConfirm")) {
+                        // skip these
+                        continue;
                     }
                 }
                 if (prop.isFileUpload()) {
-                	//don't handle files for user properties for now.
-                	continue;
-                    //uploadHandler.setFile(parent, prop, changes);
+                    // don't handle files for user properties for now.
+                    continue;
+                    // uploadHandler.setFile(parent, prop, changes);
                 } else {
-                	setPropertyAsIs(session, authorizable, prop, changes);
+                    setPropertyAsIs(session, authorizable, prop, changes);
                 }
             }
         }
     }
-    
+
     /**
      * set property without processing, except for type hints
-     *
+     * 
      * @param parent the parent node
      * @param prop the request property
      * @throws RepositoryException if a repository error occurs.
      */
-    private void setPropertyAsIs(Session session, Authorizable parent, RequestProperty prop, List<Modification> changes)
+    private void setPropertyAsIs(Session session, Authorizable parent,
+            RequestProperty prop, List<Modification> changes)
             throws RepositoryException {
 
-    	String parentPath;
-    	if (parent.isGroup()) {
-    		parentPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX + parent.getID();
-    	} else {
-    		parentPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX + parent.getID();
-    	}
-
+        String parentPath;
+        if (parent.isGroup()) {
+            parentPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
+                + parent.getID();
+        } else {
+            parentPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+                + parent.getID();
+        }
 
         // no explicit typehint
         int type = PropertyType.UNDEFINED;
@@ -525,29 +543,29 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
         }
 
         String[] values = prop.getStringValues();
-		if (values == null) {
+        if (values == null) {
             // remove property
-	        boolean removedProp = removePropertyIfExists(parent, prop.getName());
-	        if (removedProp) {
-	            changes.add(Modification.onDeleted(
-	            		parentPath + "/" + prop.getName()
-	            ));
-	        }
+            boolean removedProp = removePropertyIfExists(parent, prop.getName());
+            if (removedProp) {
+                changes.add(Modification.onDeleted(parentPath + "/"
+                    + prop.getName()));
+            }
         } else if (values.length == 0) {
             // do not create new prop here, but clear existing
             if (parent.hasProperty(prop.getName())) {
-            	Value val = session.getValueFactory().createValue("");
-            	parent.setProperty(prop.getName(), val);
-                changes.add(Modification.onModified(
-                	parentPath + "/" + prop.getName()
-                ));
+                Value val = session.getValueFactory().createValue("");
+                parent.setProperty(prop.getName(), val);
+                changes.add(Modification.onModified(parentPath + "/"
+                    + prop.getName()));
             }
         } else if (values.length == 1) {
             boolean removedProp = removePropertyIfExists(parent, prop.getName());
-            // if the provided value is the empty string, we don't have to do anything.
-            if ( values[0].length() == 0 ) {
-                if ( removedProp ) {
-                    changes.add(Modification.onDeleted(parentPath + "/" + prop.getName()));
+            // if the provided value is the empty string, we don't have to do
+            // anything.
+            if (values[0].length() == 0) {
+                if (removedProp) {
+                    changes.add(Modification.onDeleted(parentPath + "/"
+                        + prop.getName()));
                 }
             } else {
                 // modify property
@@ -555,38 +573,41 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
                     // try conversion
                     Calendar c = dateParser.parse(values[0]);
                     if (c != null) {
-                        if ( prop.hasMultiValueTypeHint() ) {
+                        if (prop.hasMultiValueTypeHint()) {
                             final Value[] array = new Value[1];
                             array[0] = session.getValueFactory().createValue(c);
                             parent.setProperty(prop.getName(), array);
-                            changes.add(Modification.onModified(
-                                parentPath + "/" + prop.getName()
-                            ));
+                            changes.add(Modification.onModified(parentPath
+                                + "/" + prop.getName()));
                         } else {
-                        	Value cVal = session.getValueFactory().createValue(c);
-                        	parent.setProperty(prop.getName(), cVal);
-                            changes.add(Modification.onModified(
-                                    parentPath + "/" + prop.getName()
-                                ));
+                            Value cVal = session.getValueFactory().createValue(
+                                c);
+                            parent.setProperty(prop.getName(), cVal);
+                            changes.add(Modification.onModified(parentPath
+                                + "/" + prop.getName()));
                         }
                         return;
                     }
                     // fall back to default behaviour
                 }
-                if ( type == PropertyType.UNDEFINED ) {
-                	Value val = session.getValueFactory().createValue(values[0], PropertyType.STRING);
-                	parent.setProperty(prop.getName(), val);
+                if (type == PropertyType.UNDEFINED) {
+                    Value val = session.getValueFactory().createValue(
+                        values[0], PropertyType.STRING);
+                    parent.setProperty(prop.getName(), val);
                 } else {
-                    if ( prop.hasMultiValueTypeHint() ) {
+                    if (prop.hasMultiValueTypeHint()) {
                         final Value[] array = new Value[1];
-                        array[0] = session.getValueFactory().createValue(values[0], type);
+                        array[0] = session.getValueFactory().createValue(
+                            values[0], type);
                         parent.setProperty(prop.getName(), array);
                     } else {
-                    	Value val = session.getValueFactory().createValue(values[0], type);
+                        Value val = session.getValueFactory().createValue(
+                            values[0], type);
                         parent.setProperty(prop.getName(), val);
                     }
                 }
-                changes.add(Modification.onModified(parentPath + "/" + prop.getName()));
+                changes.add(Modification.onModified(parentPath + "/"
+                    + prop.getName()));
             }
         } else {
             removePropertyIfExists(parent, prop.getName());
@@ -595,51 +616,52 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
                 ValueFactory valFac = session.getValueFactory();
                 Value[] c = dateParser.parse(values, valFac);
                 if (c != null) {
-                	parent.setProperty(prop.getName(), c);
-                    changes.add(Modification.onModified(
-                    		parentPath + "/" + prop.getName()
-                    ));
+                    parent.setProperty(prop.getName(), c);
+                    changes.add(Modification.onModified(parentPath + "/"
+                        + prop.getName()));
                     return;
                 }
                 // fall back to default behaviour
             }
 
-            Value [] vals = new Value[values.length];
-            if ( type == PropertyType.UNDEFINED ) {
-            	for(int i=0; i < values.length; i++) {
-            		vals[i] = session.getValueFactory().createValue(values[i]);
-            	}
+            Value[] vals = new Value[values.length];
+            if (type == PropertyType.UNDEFINED) {
+                for (int i = 0; i < values.length; i++) {
+                    vals[i] = session.getValueFactory().createValue(values[i]);
+                }
             } else {
-            	for(int i=0; i < values.length; i++) {
-            		vals[i] = session.getValueFactory().createValue(values[i], type);
-            	}
+                for (int i = 0; i < values.length; i++) {
+                    vals[i] = session.getValueFactory().createValue(values[i],
+                        type);
+                }
             }
-        	parent.setProperty(prop.getName(), vals);
-            changes.add(Modification.onModified(parentPath + "/" + prop.getName()));
+            parent.setProperty(prop.getName(), vals);
+            changes.add(Modification.onModified(parentPath + "/"
+                + prop.getName()));
         }
-    
+
     }
 
     /**
      * Removes the property with the given name from the parent resource if it
      * exists.
-     *
+     * 
      * @param parent the parent resource
      * @param name the name of the property to remove
-     * @return path of the property that was removed or <code>null</code> if
-     *         it was not removed
+     * @return path of the property that was removed or <code>null</code> if it
+     *         was not removed
      * @throws RepositoryException if a repository error occurs.
      */
-	private boolean removePropertyIfExists(Authorizable resource, String name) throws RepositoryException {
-    	if (resource.getProperty(name) != null) {
-    		resource.removeProperty(name);
-    		return true;
-    	}
-    	return false;
-	}
+    private boolean removePropertyIfExists(Authorizable resource, String name)
+            throws RepositoryException {
+        if (resource.getProperty(name) != null) {
+            resource.removeProperty(name);
+            return true;
+        }
+        return false;
+    }
 
-	
-	// ------ These methods were copied from AbstractSlingPostOperation ------
+    // ------ These methods were copied from AbstractSlingPostOperation ------
 
     /**
      * Returns the path of the resource of the request as the item path.
@@ -654,7 +676,7 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
     /**
      * Returns an external form of the given path prepending the context path
      * and appending a display extension.
-     *
+     * 
      * @param path the path to externalize
      * @return the url
      */
@@ -675,20 +697,20 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
 
         return ret.toString();
     }
-	
+
     /**
-     * Returns <code>true</code> if the <code>name</code> starts with either
-     * of the prefixes
-     * {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_CURRENT <code>./</code>},
-     * {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_PARENT <code>../</code>}
-     * and {@link SlingPostConstants#ITEM_PREFIX_ABSOLUTE <code>/</code>}.
+     * Returns <code>true</code> if the <code>name</code> starts with either of
+     * the prefixes {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_CURRENT
+     * <code>./</code>}, {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_PARENT
+     * <code>../</code>} and {@link SlingPostConstants#ITEM_PREFIX_ABSOLUTE
+     * <code>/</code>}.
      */
     protected boolean hasItemPathPrefix(String name) {
         return name.startsWith(SlingPostConstants.ITEM_PREFIX_ABSOLUTE)
             || name.startsWith(SlingPostConstants.ITEM_PREFIX_RELATIVE_CURRENT)
             || name.startsWith(SlingPostConstants.ITEM_PREFIX_RELATIVE_PARENT);
     }
-    
+
     /**
      * Returns true if any of the request parameters starts with
      * {@link SlingPostConstants#ITEM_PREFIX_RELATIVE_CURRENT <code>./</code>}.
@@ -713,5 +735,5 @@ public abstract class AbstractAuthorizablePostServlet extends SlingAllMethodsSer
 
         return requirePrefix;
     }
-    
+
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java
index 675aeb8..1c677d6 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java
@@ -32,64 +32,70 @@ import org.apache.sling.servlets.post.SlingPostConstants;
 /**
  * Base class for servlets manipulating groups
  */
-public abstract class AbstractGroupPostServlet extends AbstractAuthorizablePostServlet {
-	private static final long serialVersionUID = 1159063041816944076L;
+public abstract class AbstractGroupPostServlet extends
+        AbstractAuthorizablePostServlet {
+    private static final long serialVersionUID = 1159063041816944076L;
 
-	/**
-     * Update the group membership based on the ":member" request
-     * parameters.  If the ":member" value ends with @Delete it is removed
-     * from the group membership, otherwise it is added to the group membership.
+    /**
+     * Update the group membership based on the ":member" request parameters. If
+     * the ":member" value ends with @Delete it is removed from the group
+     * membership, otherwise it is added to the group membership.
      * 
      * @param request
      * @param authorizable
      * @throws RepositoryException
      */
-	protected void updateGroupMembership(SlingHttpServletRequest request,
-			Authorizable authorizable, List<Modification> changes) throws RepositoryException {
-		if (authorizable.isGroup()) {
-			Group group = ((Group)authorizable);
-    		String groupPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX + group.getID(); 
+    protected void updateGroupMembership(SlingHttpServletRequest request,
+            Authorizable authorizable, List<Modification> changes)
+            throws RepositoryException {
+        if (authorizable.isGroup()) {
+            Group group = ((Group) authorizable);
+            String groupPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
+                + group.getID();
 
-	    	ResourceResolver resolver = request.getResourceResolver();
-	    	Resource baseResource = request.getResource();
-	    	boolean changed = false;
+            ResourceResolver resolver = request.getResourceResolver();
+            Resource baseResource = request.getResource();
+            boolean changed = false;
 
-	    	//first remove any members posted as ":member@Delete"
-	    	String[] membersToDelete = request.getParameterValues(SlingPostConstants.RP_PREFIX + "member" + SlingPostConstants.SUFFIX_DELETE);
-	    	if (membersToDelete != null) {
-				for (String member : membersToDelete) {
-	                Resource res = resolver.getResource(baseResource, member);
-	                if (res != null) {
-	                	Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
-	                	if (memberAuthorizable != null) {
-	                		group.removeMember(memberAuthorizable);
-	                		changed = true;
-	                	}
-	                }
-					
-				}
-	    	}
-	    	
-	    	//second add any members posted as ":member"
-	    	String[] membersToAdd = request.getParameterValues(SlingPostConstants.RP_PREFIX + "member");
-	    	if (membersToAdd != null) {
-				for (String member : membersToAdd) {
-	                Resource res = resolver.getResource(baseResource, member);
-	                if (res != null) {
-	                	Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
-	                	if (memberAuthorizable != null) {
-	                		group.addMember(memberAuthorizable);
-	                		changed = true;
-	                	}
-	                }
-				}
-	    	}
+            // first remove any members posted as ":member@Delete"
+            String[] membersToDelete = request.getParameterValues(SlingPostConstants.RP_PREFIX
+                + "member" + SlingPostConstants.SUFFIX_DELETE);
+            if (membersToDelete != null) {
+                for (String member : membersToDelete) {
+                    Resource res = resolver.getResource(baseResource, member);
+                    if (res != null) {
+                        Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
+                        if (memberAuthorizable != null) {
+                            group.removeMember(memberAuthorizable);
+                            changed = true;
+                        }
+                    }
+
+                }
+            }
+
+            // second add any members posted as ":member"
+            String[] membersToAdd = request.getParameterValues(SlingPostConstants.RP_PREFIX
+                + "member");
+            if (membersToAdd != null) {
+                for (String member : membersToAdd) {
+                    Resource res = resolver.getResource(baseResource, member);
+                    if (res != null) {
+                        Authorizable memberAuthorizable = res.adaptTo(Authorizable.class);
+                        if (memberAuthorizable != null) {
+                            group.addMember(memberAuthorizable);
+                            changed = true;
+                        }
+                    }
+                }
+            }
+
+            if (changed) {
+                // add an entry to the changes list to record the membership
+                // change
+                changes.add(Modification.onModified(groupPath + "/members"));
+            }
+        }
+    }
 
-	    	if (changed) {
-        		//add an entry to the changes list to record the membership change
-        		changes.add(Modification.onModified(groupPath + "/members"));
-	    	}
-		}
-	}
-	
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java
index 8e32ae9..87cf907 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java
@@ -26,30 +26,34 @@ import org.osgi.service.component.ComponentContext;
 /**
  * Base class for servlets manipulating users
  */
-public abstract class AbstractUserPostServlet extends AbstractAuthorizablePostServlet {
-	private static final long serialVersionUID = -8401210711297654453L;
+public abstract class AbstractUserPostServlet extends
+        AbstractAuthorizablePostServlet {
+    private static final long serialVersionUID = -8401210711297654453L;
 
-	/**
+    /**
      * To be used for the encryption. E.g. for passwords in
-     * {@link javax.jcr.SimpleCredentials#getPassword()}  SimpleCredentials} 
+     * {@link javax.jcr.SimpleCredentials#getPassword()} SimpleCredentials}
+     * 
      * @scr.property valueRef="DEFAULT_PASSWORD_DIGEST_ALGORITHM"
      */
     private static final String PROP_PASSWORD_DIGEST_ALGORITHM = "password.digest.algorithm";
+
     private static final String DEFAULT_PASSWORD_DIGEST_ALGORITHM = "sha1";
+
     private String passwordDigestAlgoritm = null;
 
     // ---------- SCR Integration ----------------------------------------------
 
     protected void activate(ComponentContext context) {
         super.activate(context);
-        
+
         Dictionary<?, ?> props = context.getProperties();
 
         Object propValue = props.get(PROP_PASSWORD_DIGEST_ALGORITHM);
         if (propValue instanceof String) {
-        	passwordDigestAlgoritm = (String)propValue;
+            passwordDigestAlgoritm = (String) propValue;
         } else {
-        	passwordDigestAlgoritm = DEFAULT_PASSWORD_DIGEST_ALGORITHM;
+            passwordDigestAlgoritm = DEFAULT_PASSWORD_DIGEST_ALGORITHM;
         }
     }
 
@@ -57,7 +61,7 @@ public abstract class AbstractUserPostServlet extends AbstractAuthorizablePostSe
         super.deactivate(context);
         passwordDigestAlgoritm = null;
     }
-    
+
     /**
      * Digest the given password using the configured digest algorithm
      * 
@@ -69,7 +73,8 @@ public abstract class AbstractUserPostServlet extends AbstractAuthorizablePostSe
         try {
             StringBuffer password = new StringBuffer();
             password.append("{").append(passwordDigestAlgoritm).append("}");
-            password.append(Text.digest(passwordDigestAlgoritm, pwd.getBytes("UTF-8")));
+            password.append(Text.digest(passwordDigestAlgoritm,
+                pwd.getBytes("UTF-8")));
             return password.toString();
         } catch (NoSuchAlgorithmException e) {
             throw new IllegalArgumentException(e.toString());
@@ -77,5 +82,5 @@ public abstract class AbstractUserPostServlet extends AbstractAuthorizablePostSe
             throw new IllegalArgumentException(e.toString());
         }
     }
-    
+
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java
index 9feddec..118f6aa 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java
@@ -31,77 +31,83 @@ import org.apache.sling.api.servlets.HtmlResponse;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating the password of a user in the 
- * jackrabbit UserManager.
+ * Sling Post Operation implementation for updating the password of a user in
+ * the jackrabbit UserManager.
  * 
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/user"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="changePassword" 
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="changePassword"
  */
 public class ChangeUserPasswordServlet extends AbstractUserPostServlet {
-	private static final long serialVersionUID = 1923614318474654502L;
+    private static final long serialVersionUID = 1923614318474654502L;
 
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
-			throws RepositoryException {
-		Authorizable authorizable = null;
-		Resource resource = request.getResource();
-		if (resource != null) {
-			authorizable = resource.adaptTo(Authorizable.class);
-		}
-		
-		//check that the user was located.
-		if (authorizable == null || authorizable.isGroup()) {
-			throw new ResourceNotFoundException("User to update could not be determined.");
-		}
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse htmlResponse, List<Modification> changes)
+            throws RepositoryException {
+        Authorizable authorizable = null;
+        Resource resource = request.getResource();
+        if (resource != null) {
+            authorizable = resource.adaptTo(Authorizable.class);
+        }
 
-		if ("anonymous".equals(authorizable.getID())) {
-			throw new RepositoryException("Can not change the password of the anonymous user.");
-		}
+        // check that the user was located.
+        if (authorizable == null || authorizable.isGroup()) {
+            throw new ResourceNotFoundException(
+                "User to update could not be determined.");
+        }
 
-		Session session = request.getResourceResolver().adaptTo(Session.class);
-		if (session == null) {
-			throw new RepositoryException("JCR Session not found");
-		}
+        if ("anonymous".equals(authorizable.getID())) {
+            throw new RepositoryException(
+                "Can not change the password of the anonymous user.");
+        }
 
-		//check that the submitted parameter values have valid values.
-		String oldPwd = request.getParameter("oldPwd");
-		if (oldPwd == null || oldPwd.length() == 0) {
-			throw new RepositoryException("Old Password was not submitted");
-		}
-		String newPwd = request.getParameter("newPwd");
-		if (newPwd == null || newPwd.length() == 0) {
-			throw new RepositoryException("New Password was not submitted");
-		}
-		String newPwdConfirm = request.getParameter("newPwdConfirm");
-		if (!newPwd.equals(newPwdConfirm)) {
-			throw new RepositoryException("New Password does not match the confirmation password");
-		}
-		
-		try {
-			String digestedOldPwd = digestPassword(oldPwd);
-			Value[] pwdProperty = ((User)authorizable).getProperty("rep:password");
-			if (pwdProperty != null && pwdProperty.length > 0) {
-				String repPasswordValue = pwdProperty[0].getString();
-				if (!digestedOldPwd.equals(repPasswordValue)) {
-					//submitted oldPwd value is not correct.
-					throw new RepositoryException("Old Password does not match");
-				}
-			}
-				
-			((User)authorizable).changePassword(digestPassword(newPwd));
-			
-            changes.add(Modification.onModified(
-                	resource.getPath() + "/rep:password"
-                ));
-		} catch (RepositoryException re) {
-			throw new RepositoryException("Failed to change user password.", re);
-		}
-	}
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        if (session == null) {
+            throw new RepositoryException("JCR Session not found");
+        }
+
+        // check that the submitted parameter values have valid values.
+        String oldPwd = request.getParameter("oldPwd");
+        if (oldPwd == null || oldPwd.length() == 0) {
+            throw new RepositoryException("Old Password was not submitted");
+        }
+        String newPwd = request.getParameter("newPwd");
+        if (newPwd == null || newPwd.length() == 0) {
+            throw new RepositoryException("New Password was not submitted");
+        }
+        String newPwdConfirm = request.getParameter("newPwdConfirm");
+        if (!newPwd.equals(newPwdConfirm)) {
+            throw new RepositoryException(
+                "New Password does not match the confirmation password");
+        }
+
+        try {
+            String digestedOldPwd = digestPassword(oldPwd);
+            Value[] pwdProperty = ((User) authorizable).getProperty("rep:password");
+            if (pwdProperty != null && pwdProperty.length > 0) {
+                String repPasswordValue = pwdProperty[0].getString();
+                if (!digestedOldPwd.equals(repPasswordValue)) {
+                    // submitted oldPwd value is not correct.
+                    throw new RepositoryException("Old Password does not match");
+                }
+            }
+
+            ((User) authorizable).changePassword(digestPassword(newPwd));
+
+            changes.add(Modification.onModified(resource.getPath()
+                + "/rep:password"));
+        } catch (RepositoryException re) {
+            throw new RepositoryException("Failed to change user password.", re);
+        }
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java
index a7e162b..67814ba 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java
@@ -38,63 +38,73 @@ import org.apache.sling.servlets.post.SlingPostConstants;
  * Sling Post Servlet implementation for creating a group in the jackrabbit
  * UserManager.
  * 
- * @scr.component immediate="true" 
+ * @scr.component immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/groups"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="create" 
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="create"
  */
 public class CreateGroupServlet extends AbstractGroupPostServlet {
-	private static final long serialVersionUID = -1084915263933901466L;
+    private static final long serialVersionUID = -1084915263933901466L;
 
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse response, List<Modification> changes) throws RepositoryException {
-		
-		//check that the submitted parameter values have valid values.
-		final String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
-		if (principalName == null) {
-			throw new RepositoryException("Group name was not submitted");
-		}
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse response, List<Modification> changes)
+            throws RepositoryException {
 
-		Session session = request.getResourceResolver().adaptTo(Session.class);
-		if (session == null) {
-			throw new RepositoryException("JCR Session not found");
-		}
+        // check that the submitted parameter values have valid values.
+        final String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
+        if (principalName == null) {
+            throw new RepositoryException("Group name was not submitted");
+        }
 
-		try {
-			UserManager userManager = AccessControlUtil.getUserManager(session);
-			Authorizable authorizable = userManager.getAuthorizable(principalName);
-			
-			if (authorizable != null) {
-				//principal already exists!
-				throw new RepositoryException("A principal already exists with the requested name: " + principalName);
-			} else {
-				Map<String, RequestProperty> reqProperties = collectContent(request, response);
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        if (session == null) {
+            throw new RepositoryException("JCR Session not found");
+        }
 
-				Group group = userManager.createGroup(new Principal() {
-					public String getName() {
-						return principalName;
-					}
-				});
+        try {
+            UserManager userManager = AccessControlUtil.getUserManager(session);
+            Authorizable authorizable = userManager.getAuthorizable(principalName);
 
-				String groupPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX + group.getID();
-				response.setPath(groupPath);
-				response.setLocation(externalizePath(request, groupPath));
-				response.setParentLocation(externalizePath(request, AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PATH));
-				changes.add(Modification.onCreated(groupPath));
-				
-		        // write content from form
-		        writeContent(session, group, reqProperties, changes);
-		        
-		        //update the group memberships
-		        updateGroupMembership(request, group, changes);
-			}
-		} catch (RepositoryException re) {
-			throw new RepositoryException("Failed to create new group.", re);
-		}
-	}
+            if (authorizable != null) {
+                // principal already exists!
+                throw new RepositoryException(
+                    "A principal already exists with the requested name: "
+                        + principalName);
+            } else {
+                Map<String, RequestProperty> reqProperties = collectContent(
+                    request, response);
+
+                Group group = userManager.createGroup(new Principal() {
+                    public String getName() {
+                        return principalName;
+                    }
+                });
+
+                String groupPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PREFIX
+                    + group.getID();
+                response.setPath(groupPath);
+                response.setLocation(externalizePath(request, groupPath));
+                response.setParentLocation(externalizePath(request,
+                    AuthorizableResourceProvider.SYSTEM_USER_MANAGER_GROUP_PATH));
+                changes.add(Modification.onCreated(groupPath));
+
+                // write content from form
+                writeContent(session, group, reqProperties, changes);
+
+                // update the group memberships
+                updateGroupMembership(request, group, changes);
+            }
+        } catch (RepositoryException re) {
+            throw new RepositoryException("Failed to create new group.", re);
+        }
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java
index c8259dc..7d0c9af 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java
@@ -46,29 +46,31 @@ import org.slf4j.LoggerFactory;
  *                description="%createUser.post.operation.description"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/users"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="create" 
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="create"
  */
 public class CreateUserServlet extends AbstractUserPostServlet {
-	private static final long serialVersionUID = 6871481922737658675L;
+    private static final long serialVersionUID = 6871481922737658675L;
 
-	/**
+    /**
      * default log
      */
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    /** @scr.property label="%self.registration.enabled.name" 
-     * 					description="%self.registration.enabled.description" 
-     * 					valueRef="DEFAULT_SELF_REGISTRATION_ENABLED" 
+    /**
+     * @scr.property label="%self.registration.enabled.name"
+     *               description="%self.registration.enabled.description"
+     *               valueRef="DEFAULT_SELF_REGISTRATION_ENABLED"
      */
     private static final String PROP_SELF_REGISTRATION_ENABLED = "self.registration.enabled";
+
     private static final Boolean DEFAULT_SELF_REGISTRATION_ENABLED = Boolean.TRUE;
 
     private Boolean selfRegistrationEnabled = DEFAULT_SELF_REGISTRATION_ENABLED;
 
     /**
      * The JCR Repository we access to resolve resources
-     *
+     * 
      * @scr.reference
      */
     private SlingRepository repository;
@@ -89,7 +91,7 @@ public class CreateUserServlet extends AbstractUserPostServlet {
      * Return the administrative session and close it.
      */
     private void ungetSession(final Session session) {
-        if ( session != null ) {
+        if (session != null) {
             try {
                 session.logout();
             } catch (Throwable t) {
@@ -102,83 +104,94 @@ public class CreateUserServlet extends AbstractUserPostServlet {
 
     /**
      * Activates this component.
-     *
+     * 
      * @param componentContext The OSGi <code>ComponentContext</code> of this
-     *      component.
+     *            component.
      */
     protected void activate(ComponentContext componentContext) {
-    	super.activate(componentContext);
+        super.activate(componentContext);
         Dictionary<?, ?> props = componentContext.getProperties();
         Object propValue = props.get(PROP_SELF_REGISTRATION_ENABLED);
         if (propValue instanceof String) {
-        	selfRegistrationEnabled = Boolean.parseBoolean((String)propValue);
+            selfRegistrationEnabled = Boolean.parseBoolean((String) propValue);
         } else {
-        	selfRegistrationEnabled = DEFAULT_SELF_REGISTRATION_ENABLED;
+            selfRegistrationEnabled = DEFAULT_SELF_REGISTRATION_ENABLED;
         }
     }
 
-    
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse response, List<Modification> changes) throws RepositoryException {
-		//make sure user self-registration is enabled
-		if (!selfRegistrationEnabled) {
-			throw new RepositoryException("Sorry, registration of new users is not currently enabled.  Please try again later.");
-		}
-
-		Session session = request.getResourceResolver().adaptTo(Session.class);
-		if (session == null) {
-			throw new RepositoryException("JCR Session not found");
-		}
-		
-		//check that the submitted parameter values have valid values.
-		String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
-		if (principalName == null) {
-			throw new RepositoryException("User name was not submitted");
-		}
-		String pwd = request.getParameter("pwd");
-		if (pwd == null) {
-			throw new RepositoryException("Password was not submitted");
-		}
-		String pwdConfirm = request.getParameter("pwdConfirm");
-		if (!pwd.equals(pwdConfirm)) {
-			throw new RepositoryException("Password value does not match the confirmation password");
-		}
-		
-		Session selfRegSession = null;
-		try {
-			selfRegSession = getSession();
-
-			UserManager userManager = AccessControlUtil.getUserManager(selfRegSession);
-			Authorizable authorizable = userManager.getAuthorizable(principalName);
-			
-			if (authorizable != null) {
-				//user already exists!
-				throw new RepositoryException("A principal already exists with the requested name: " + principalName);
-			} else {
-				Map<String, RequestProperty> reqProperties = collectContent(request, response);
-
-				User user = userManager.createUser(principalName, digestPassword(pwd));
-				String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX + user.getID();
-				
-				response.setPath(userPath);
-				response.setLocation(externalizePath(request, userPath));
-				response.setParentLocation(externalizePath(request, AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PATH));
-				changes.add(Modification.onCreated(userPath));
-				
-		        // write content from form
-		        writeContent(selfRegSession, user, reqProperties, changes);
-				
-				if (selfRegSession.hasPendingChanges()) {
-					selfRegSession.save();
-				}
-			}
-		} finally {
-			ungetSession(selfRegSession);
-		}
-	}
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse response, List<Modification> changes)
+            throws RepositoryException {
+        // make sure user self-registration is enabled
+        if (!selfRegistrationEnabled) {
+            throw new RepositoryException(
+                "Sorry, registration of new users is not currently enabled.  Please try again later.");
+        }
+
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        if (session == null) {
+            throw new RepositoryException("JCR Session not found");
+        }
+
+        // check that the submitted parameter values have valid values.
+        String principalName = request.getParameter(SlingPostConstants.RP_NODE_NAME);
+        if (principalName == null) {
+            throw new RepositoryException("User name was not submitted");
+        }
+        String pwd = request.getParameter("pwd");
+        if (pwd == null) {
+            throw new RepositoryException("Password was not submitted");
+        }
+        String pwdConfirm = request.getParameter("pwdConfirm");
+        if (!pwd.equals(pwdConfirm)) {
+            throw new RepositoryException(
+                "Password value does not match the confirmation password");
+        }
+
+        Session selfRegSession = null;
+        try {
+            selfRegSession = getSession();
+
+            UserManager userManager = AccessControlUtil.getUserManager(selfRegSession);
+            Authorizable authorizable = userManager.getAuthorizable(principalName);
+
+            if (authorizable != null) {
+                // user already exists!
+                throw new RepositoryException(
+                    "A principal already exists with the requested name: "
+                        + principalName);
+            } else {
+                Map<String, RequestProperty> reqProperties = collectContent(
+                    request, response);
+
+                User user = userManager.createUser(principalName,
+                    digestPassword(pwd));
+                String userPath = AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PREFIX
+                    + user.getID();
+
+                response.setPath(userPath);
+                response.setLocation(externalizePath(request, userPath));
+                response.setParentLocation(externalizePath(request,
+                    AuthorizableResourceProvider.SYSTEM_USER_MANAGER_USER_PATH));
+                changes.add(Modification.onCreated(userPath));
+
+                // write content from form
+                writeContent(selfRegSession, user, reqProperties, changes);
+
+                if (selfRegSession.hasPendingChanges()) {
+                    selfRegSession.save();
+                }
+            }
+        } finally {
+            ungetSession(selfRegSession);
+        }
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java
index 39ac672..44d6a7b 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java
@@ -33,34 +33,40 @@ import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
 /**
- * Sling Post Operation implementation for deleting one or more users and/or groups from the 
- * jackrabbit UserManager.
+ * Sling Post Operation implementation for deleting one or more users and/or
+ * groups from the jackrabbit UserManager.
  * 
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
- * @scr.property name="sling.servlet.resourceTypes" values.0="sling/user" values.1="sling/group" values.2="sling/userManager"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="delete" 
+ * @scr.property name="sling.servlet.resourceTypes" values.0="sling/user"
+ *               values.1="sling/group" values.2="sling/userManager"
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="delete"
  */
 public class DeleteAuthorizableServlet extends AbstractAuthorizablePostServlet {
-	private static final long serialVersionUID = 5874621724096106496L;
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
-			throws RepositoryException {
+    private static final long serialVersionUID = 5874621724096106496L;
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse htmlResponse, List<Modification> changes)
+            throws RepositoryException {
 
         Iterator<Resource> res = getApplyToResources(request);
         if (res == null) {
             Resource resource = request.getResource();
             Authorizable item = resource.adaptTo(Authorizable.class);
             if (item == null) {
-  	            String msg = "Missing source " + resource.getPath() + " for delete";
-  	            htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
-               	throw new ResourceNotFoundException(msg);
+                String msg = "Missing source " + resource.getPath()
+                    + " for delete";
+                htmlResponse.setStatus(HttpServletResponse.SC_NOT_FOUND, msg);
+                throw new ResourceNotFoundException(msg);
             }
 
             item.remove();
@@ -75,17 +81,16 @@ public class DeleteAuthorizableServlet extends AbstractAuthorizablePostServlet {
                 }
             }
         }
-	}
-	
-	
+    }
+
     /**
      * Returns an iterator on <code>Resource</code> instances addressed in the
      * {@link SlingPostConstants#RP_APPLY_TO} request parameter. If the request
-     * parameter is not set, <code>null</code> is returned. If the parameter
-     * is set with valid resources an empty iterator is returned. Any resources
+     * parameter is not set, <code>null</code> is returned. If the parameter is
+     * set with valid resources an empty iterator is returned. Any resources
      * addressed in the {@link SlingPostConstants#RP_APPLY_TO} parameter is
      * ignored.
-     *
+     * 
      * @param request The <code>SlingHttpServletRequest</code> object used to
      *            get the {@link SlingPostConstants#RP_APPLY_TO} parameter.
      * @return The iterator of resources listed in the parameter or
@@ -105,7 +110,9 @@ public class DeleteAuthorizableServlet extends AbstractAuthorizablePostServlet {
     private static class ApplyToIterator implements Iterator<Resource> {
 
         private final ResourceResolver resolver;
+
         private final Resource baseResource;
+
         private final String[] paths;
 
         private int pathIndex;
@@ -155,5 +162,5 @@ public class DeleteAuthorizableServlet extends AbstractAuthorizablePostServlet {
             return null;
         }
     }
-	
+
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java
index 4e433a8..5c06cf1 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java
@@ -31,55 +31,61 @@ import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating a group in the 
- * jackrabbit UserManager.
+ * Sling Post Operation implementation for updating a group in the jackrabbit
+ * UserManager.
  * 
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" values="sling/group"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="update" 
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="update"
  */
 public class UpdateGroupServlet extends AbstractGroupPostServlet {
-	private static final long serialVersionUID = -8292054361992488797L;
+    private static final long serialVersionUID = -8292054361992488797L;
 
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
-			throws RepositoryException {
-		Authorizable authorizable = null;
-		Resource resource = request.getResource();
-		if (resource != null) {
-			authorizable = resource.adaptTo(Authorizable.class);
-		}
-		
-		//check that the group was located.
-		if (authorizable == null) {
-			throw new ResourceNotFoundException("Group to update could not be determined");
-		}
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse htmlResponse, List<Modification> changes)
+            throws RepositoryException {
+        Authorizable authorizable = null;
+        Resource resource = request.getResource();
+        if (resource != null) {
+            authorizable = resource.adaptTo(Authorizable.class);
+        }
 
-		Session session = request.getResourceResolver().adaptTo(Session.class);
-		if (session == null) {
-			throw new RepositoryException("JCR Session not found");
-		}
+        // check that the group was located.
+        if (authorizable == null) {
+            throw new ResourceNotFoundException(
+                "Group to update could not be determined");
+        }
 
-		Map<String, RequestProperty> reqProperties = collectContent(request, htmlResponse);
-		try {
-	        // cleanup any old content (@Delete parameters)
-	        processDeletes(authorizable, reqProperties, changes);
-				
-	        // write content from form
-	        writeContent(session, authorizable, reqProperties, changes);
-	        
-	        //update the group memberships
-			if (authorizable.isGroup()) {
-		        updateGroupMembership(request, authorizable, changes);
-			}
-		} catch (RepositoryException re) {
-			throw new RepositoryException("Failed to update group.", re);
-		}
-	}
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        if (session == null) {
+            throw new RepositoryException("JCR Session not found");
+        }
+
+        Map<String, RequestProperty> reqProperties = collectContent(request,
+            htmlResponse);
+        try {
+            // cleanup any old content (@Delete parameters)
+            processDeletes(authorizable, reqProperties, changes);
+
+            // write content from form
+            writeContent(session, authorizable, reqProperties, changes);
+
+            // update the group memberships
+            if (authorizable.isGroup()) {
+                updateGroupMembership(request, authorizable, changes);
+            }
+        } catch (RepositoryException re) {
+            throw new RepositoryException("Failed to update group.", re);
+        }
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java
index d0245c6..70d0501 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java
@@ -31,51 +31,57 @@ import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
- * Sling Post Operation implementation for updating a user in the 
- * jackrabbit UserManager.
+ * Sling Post Operation implementation for updating a user in the jackrabbit
+ * UserManager.
  * 
  * @scr.component metatype="no" immediate="true"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="sling.servlet.resourceTypes" value="sling/user"
- * @scr.property name="sling.servlet.methods" value="POST" 
- * @scr.property name="sling.servlet.selectors" value="update" 
+ * @scr.property name="sling.servlet.methods" value="POST"
+ * @scr.property name="sling.servlet.selectors" value="update"
  */
 public class UpdateUserServlet extends AbstractUserPostServlet {
-	private static final long serialVersionUID = 5874621724096106496L;
+    private static final long serialVersionUID = 5874621724096106496L;
 
-	/* (non-Javadoc)
-	 * @see org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet#handleOperation(org.apache.sling.api.SlingHttpServletRequest, org.apache.sling.api.servlets.HtmlResponse, java.util.List)
-	 */
-	@Override
-	protected void handleOperation(SlingHttpServletRequest request,
-			HtmlResponse htmlResponse, List<Modification> changes)
-			throws RepositoryException {
-		Authorizable authorizable = null;
-		Resource resource = request.getResource();
-		if (resource != null) {
-			authorizable = resource.adaptTo(Authorizable.class);
-		}
-		
-		//check that the group was located.
-		if (authorizable == null) {
-			throw new ResourceNotFoundException("User to update could not be determined");
-		}
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.jackrabbit.usermanager.post.AbstractAuthorizablePostServlet
+     * #handleOperation(org.apache.sling.api.SlingHttpServletRequest,
+     * org.apache.sling.api.servlets.HtmlResponse, java.util.List)
+     */
+    @Override
+    protected void handleOperation(SlingHttpServletRequest request,
+            HtmlResponse htmlResponse, List<Modification> changes)
+            throws RepositoryException {
+        Authorizable authorizable = null;
+        Resource resource = request.getResource();
+        if (resource != null) {
+            authorizable = resource.adaptTo(Authorizable.class);
+        }
 
-		Session session = request.getResourceResolver().adaptTo(Session.class);
-		if (session == null) {
-			throw new RepositoryException("JCR Session not found");
-		}
+        // check that the group was located.
+        if (authorizable == null) {
+            throw new ResourceNotFoundException(
+                "User to update could not be determined");
+        }
 
-		Map<String, RequestProperty> reqProperties = collectContent(request, htmlResponse);
-		try {
-	        // cleanup any old content (@Delete parameters)
-	        processDeletes(authorizable, reqProperties, changes);
-				
-	        // write content from form
-	        writeContent(session, authorizable, reqProperties, changes);
+        Session session = request.getResourceResolver().adaptTo(Session.class);
+        if (session == null) {
+            throw new RepositoryException("JCR Session not found");
+        }
 
-		} catch (RepositoryException re) {
-			throw new RepositoryException("Failed to update user.", re);
-		}
-	}
+        Map<String, RequestProperty> reqProperties = collectContent(request,
+            htmlResponse);
+        try {
+            // cleanup any old content (@Delete parameters)
+            processDeletes(authorizable, reqProperties, changes);
+
+            // write content from form
+            writeContent(session, authorizable, reqProperties, changes);
+
+        } catch (RepositoryException re) {
+            throw new RepositoryException("Failed to update user.", re);
+        }
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java
index 227ea4c..c2f4769 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java
@@ -48,8 +48,9 @@ public class DateParser {
     private final List<DateFormat> formats = new LinkedList<DateFormat>();
 
     /**
-     * Registers a format string to the list of internally checked ones.
-     * Uses the {@link SimpleDateFormat}.
+     * Registers a format string to the list of internally checked ones. Uses
+     * the {@link SimpleDateFormat}.
+     * 
      * @param format format as in {@link SimpleDateFormat}
      * @throws IllegalArgumentException if the format is not valid.
      */
@@ -59,6 +60,7 @@ public class DateParser {
 
     /**
      * Registers a date format to the list of internally checked ones.
+     * 
      * @param format date format
      */
     public void register(DateFormat format) {
@@ -70,16 +72,17 @@ public class DateParser {
      * instance. If no format matches returns <code>null</code>.
      * <p/>
      * Note: method is synchronized because SimpleDateFormat is not.
-     *
+     * 
      * @param source date time source string
      * @return calendar representation of the source or <code>null</code>
      */
     public synchronized Calendar parse(String source) {
-        for (DateFormat fmt: formats) {
+        for (DateFormat fmt : formats) {
             try {
                 Date d = fmt.parse(source);
                 if (log.isDebugEnabled()) {
-                    log.debug("Parsed " + source + " using " + fmt + " into " + d);
+                    log.debug("Parsed " + source + " using " + fmt + " into "
+                        + d);
                 }
                 Calendar c = Calendar.getInstance();
                 c.setTime(d);
@@ -95,38 +98,38 @@ public class DateParser {
 
     /**
      * Parses the given source strings and returns the respective calendar
-     * instances. If no format matches for any of the sources
-     * returns <code>null</code>.
+     * instances. If no format matches for any of the sources returns
+     * <code>null</code>.
      * <p/>
      * Note: method is synchronized because SimpleDateFormat is not.
-     *
+     * 
      * @param sources date time source strings
      * @return calendar representations of the source or <code>null</code>
      */
     public synchronized Calendar[] parse(String sources[]) {
         Calendar ret[] = new Calendar[sources.length];
-        for (int i=0; i< sources.length; i++) {
+        for (int i = 0; i < sources.length; i++) {
             if ((ret[i] = parse(sources[i])) == null) {
                 return null;
             }
         }
         return ret;
     }
-    
+
     /**
      * Parses the given source strings and returns the respective jcr date value
-     * instances. If no format matches for any of the sources
-     * returns <code>null</code>.
+     * instances. If no format matches for any of the sources returns
+     * <code>null</code>.
      * <p/>
      * Note: method is synchronized because SimpleDateFormat is not.
-     *
+     * 
      * @param sources date time source strings
      * @param factory the value factory
      * @return jcr date value representations of the source or <code>null</code>
      */
     public synchronized Value[] parse(String sources[], ValueFactory factory) {
         Value ret[] = new Value[sources.length];
-        for (int i=0; i< sources.length; i++) {
+        for (int i = 0; i < sources.length; i++) {
             Calendar c = parse(sources[i]);
             if (c == null) {
                 return null;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java
index cca1323..481ab41 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java
@@ -21,10 +21,9 @@ import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
 /**
- * This is a copy of the class from 'org.apache.sling.servlets.post.impl.helper' which is not exported.
- * 
- * Encapsulates all infos from the respective request parameters that are needed
- * to create the repository property
+ * This is a copy of the class from 'org.apache.sling.servlets.post.impl.helper'
+ * which is not exported. Encapsulates all infos from the respective request
+ * parameters that are needed to create the repository property
  */
 public class RequestProperty {
 
@@ -74,7 +73,7 @@ public class RequestProperty {
     }
 
     public void setTypeHintValue(String typeHint) {
-        if ( typeHint != null && typeHint.endsWith("[]") ) {
+        if (typeHint != null && typeHint.endsWith("[]")) {
             this.typeHint = typeHint.substring(0, typeHint.length() - 2);
             this.hasMultiValueTypeHint = true;
         } else {
@@ -126,7 +125,7 @@ public class RequestProperty {
     /**
      * Checks if this property provides any values. this is the case if one of
      * the values is not empty or if the default handling is not 'ignore'
-     *
+     * 
      * @return <code>true</code> if this property provides values
      */
     public boolean providesValue() {
@@ -148,7 +147,7 @@ public class RequestProperty {
     /**
      * Returns the assembled string array out of the provided request values and
      * default values.
-     *
+     * 
      * @return a String array or <code>null</code> if the property needs to be
      *         removed.
      */
@@ -185,7 +184,7 @@ public class RequestProperty {
     /**
      * Specifies whether this property should be deleted before any new content
      * is to be set according to the values stored.
-     *
+     * 
      * @param isDelete <code>true</code> if the repository item described by
      *            this is to be deleted before any other operation.
      */
@@ -194,8 +193,8 @@ public class RequestProperty {
     }
 
     /**
-     * Returns <code>true</code> if the repository item described by this is
-     * to be deleted before setting new content to it.
+     * Returns <code>true</code> if the repository item described by this is to
+     * be deleted before setting new content to it.
      */
     public boolean isDelete() {
         return isDelete;
@@ -205,7 +204,7 @@ public class RequestProperty {
      * Sets the path of the repository item from which the content for this
      * property is to be copied or moved. The path may be relative in which case
      * it will be resolved relative to the absolute path of this property.
-     *
+     * 
      * @param sourcePath The path of the repository item to get the content from
      * @param isMove <code>true</code> if the source content is to be moved,
      *            otherwise the source content is copied from the repository
@@ -224,9 +223,9 @@ public class RequestProperty {
     }
 
     /**
-     * Returns <code>true</code> if the content of this property is to be set
-     * by moving content from another repository item.
-     *
+     * Returns <code>true</code> if the content of this property is to be set by
+     * moving content from another repository item.
+     * 
      * @see #getRepositorySource()
      */
     public boolean hasRepositoryMoveSource() {
@@ -234,9 +233,9 @@ public class RequestProperty {
     }
 
     /**
-     * Returns <code>true</code> if the content of this property is to be set
-     * by copying content from another repository item.
-     *
+     * Returns <code>true</code> if the content of this property is to be set by
+     * copying content from another repository item.
+     * 
      * @see #getRepositorySource()
      */
     public boolean hasRepositoryCopySource() {
@@ -246,7 +245,7 @@ public class RequestProperty {
     /**
      * Returns the absolute path of the repository item from which the content
      * for this property is to be copied or moved.
-     *
+     * 
      * @see #hasRepositoryCopySource()
      * @see #hasRepositoryMoveSource()
      * @see #setRepositorySource(String, boolean)
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
index c158d46..aac15c5 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sling.jackrabbit.usermanager.resource;
 
-
 import java.util.Map;
 
 import javax.jcr.RepositoryException;
@@ -29,91 +28,102 @@ import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ValueMap;
 
 /**
- * Resource implementation for Authorizable 
+ * Resource implementation for Authorizable
  */
 public class AuthorizableResource extends SlingAdaptable implements Resource {
-	private Authorizable authorizable = null;
-	private ResourceResolver resourceResolver = null;
+    private Authorizable authorizable = null;
+
+    private ResourceResolver resourceResolver = null;
+
     private final String path;
+
     private final String resourceType;
+
     private final ResourceMetadata metadata;
-	
-	public AuthorizableResource(Authorizable authorizable,
-			ResourceResolver resourceResolver, String path) {
-		super();
 
-		this.resourceResolver = resourceResolver;
+    public AuthorizableResource(Authorizable authorizable,
+            ResourceResolver resourceResolver, String path) {
+        super();
+
+        this.resourceResolver = resourceResolver;
         this.authorizable = authorizable;
         this.path = path;
         if (authorizable.isGroup()) {
-        	this.resourceType = "sling:group";
+            this.resourceType = "sling:group";
         } else {
-        	this.resourceType = "sling:user";
+            this.resourceType = "sling:user";
         }
 
         this.metadata = new ResourceMetadata();
         metadata.setResolutionPath(path);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.Resource#getPath()
-	 */
-	public String getPath() {
-		return path;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.Resource#getResourceMetadata()
-	 */
-	public ResourceMetadata getResourceMetadata() {
-		return metadata;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.Resource#getResourceResolver()
-	 */
-	public ResourceResolver getResourceResolver() {
-		return resourceResolver;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.Resource#getResourceSuperType()
-	 */
-	public String getResourceSuperType() {
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.Resource#getResourceType()
-	 */
-	public String getResourceType() {
-		return resourceType;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.adapter.Adaptable#adaptTo(java.lang.Class)
-	 */
-	@SuppressWarnings("unchecked")
-	public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
-		if (type == Map.class || type == ValueMap.class) {
-			return (AdapterType) new AuthorizableValueMap(authorizable); // unchecked cast
-		} else if (type == Authorizable.class) {
-			return (AdapterType)authorizable;
-		}
-		
-		return super.adaptTo(type);
-	}
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.resource.Resource#getPath()
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.resource.Resource#getResourceMetadata()
+     */
+    public ResourceMetadata getResourceMetadata() {
+        return metadata;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.resource.Resource#getResourceResolver()
+     */
+    public ResourceResolver getResourceResolver() {
+        return resourceResolver;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.resource.Resource#getResourceSuperType()
+     */
+    public String getResourceSuperType() {
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.resource.Resource#getResourceType()
+     */
+    public String getResourceType() {
+        return resourceType;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.sling.api.adapter.Adaptable#adaptTo(java.lang.Class)
+     */
+    @SuppressWarnings("unchecked")
+    public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
+        if (type == Map.class || type == ValueMap.class) {
+            return (AdapterType) new AuthorizableValueMap(authorizable); // unchecked
+                                                                         // cast
+        } else if (type == Authorizable.class) {
+            return (AdapterType) authorizable;
+        }
+
+        return super.adaptTo(type);
+    }
 
     public String toString() {
         String id = null;
         if (authorizable != null) {
             try {
-				id = authorizable.getID();
-			} catch (RepositoryException e) {
-				//ignore it.
-			}
+                id = authorizable.getID();
+            } catch (RepositoryException e) {
+                // ignore it.
+            }
         }
-        return getClass().getSimpleName() + ", id=" + id
-            + ", path=" + getPath();
+        return getClass().getSimpleName() + ", id=" + id + ", path="
+            + getPath();
     }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
index af864b6..b1eeb13 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
@@ -44,177 +44,204 @@ import org.slf4j.LoggerFactory;
  * @scr.component immediate="true" label="%authorizable.resourceprovider.name"
  *                description="authorizable.resourceprovider.description"
  * @scr.property name="service.description"
- *                value="Resource provider implementation for UserManager resources"
+ *               value="Resource provider implementation for UserManager resources"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="provider.roots" value="/system/userManager/"
  * @scr.service interface="org.apache.sling.api.resource.ResourceProvider"
  */
 public class AuthorizableResourceProvider implements ResourceProvider {
-	
+
     /**
      * default log
      */
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-	public static final String SYSTEM_USER_MANAGER_PATH = "/system/userManager";
+    public static final String SYSTEM_USER_MANAGER_PATH = "/system/userManager";
+
+    public static final String SYSTEM_USER_MANAGER_USER_PATH = SYSTEM_USER_MANAGER_PATH
+        + "/user";
+
+    public static final String SYSTEM_USER_MANAGER_GROUP_PATH = SYSTEM_USER_MANAGER_PATH
+        + "/group";
 
-	public static final String SYSTEM_USER_MANAGER_USER_PATH = SYSTEM_USER_MANAGER_PATH + "/user";
-	public static final String SYSTEM_USER_MANAGER_GROUP_PATH = SYSTEM_USER_MANAGER_PATH + "/group";
+    public static final String SYSTEM_USER_MANAGER_USER_PREFIX = SYSTEM_USER_MANAGER_USER_PATH
+        + "/";
 
-	public static final String SYSTEM_USER_MANAGER_USER_PREFIX = SYSTEM_USER_MANAGER_USER_PATH + "/";
-	public static final String SYSTEM_USER_MANAGER_GROUP_PREFIX = SYSTEM_USER_MANAGER_GROUP_PATH + "/";
+    public static final String SYSTEM_USER_MANAGER_GROUP_PREFIX = SYSTEM_USER_MANAGER_GROUP_PATH
+        + "/";
 
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.ResourceProvider#getResource(org.apache.sling.api.resource.ResourceResolver, javax.servlet.http.HttpServletRequest, java.lang.String)
-	 */
-	public Resource getResource(ResourceResolver resourceResolver,
-			HttpServletRequest request, String path) {
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.api.resource.ResourceProvider#getResource(org.apache
+     * .sling.api.resource.ResourceResolver,
+     * javax.servlet.http.HttpServletRequest, java.lang.String)
+     */
+    public Resource getResource(ResourceResolver resourceResolver,
+            HttpServletRequest request, String path) {
         return getResource(resourceResolver, path);
-	}
-
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.ResourceProvider#getResource(org.apache.sling.api.resource.ResourceResolver, java.lang.String)
-	 */
-	public Resource getResource(ResourceResolver resourceResolver, String path) {
-		
-		//handle resources for the virtual container resources
-		if (path.equals(SYSTEM_USER_MANAGER_PATH)) {
-			return new SyntheticResource(resourceResolver, path, "sling:userManager");
-		} else if (path.equals(SYSTEM_USER_MANAGER_USER_PATH)) {
-			return new SyntheticResource(resourceResolver, path, "sling:users");
-		} else if (path.equals(SYSTEM_USER_MANAGER_GROUP_PATH)) {
-			return new SyntheticResource(resourceResolver, path, "sling:groups");
-		}
-		
-		// the principalId should be the first segment after the prefix
-		String pid = null;
-		if (path.startsWith(SYSTEM_USER_MANAGER_USER_PREFIX)) {
-			pid = path.substring(SYSTEM_USER_MANAGER_USER_PREFIX.length());
-		} else if (path.startsWith(SYSTEM_USER_MANAGER_GROUP_PREFIX)) {
-			pid = path.substring(SYSTEM_USER_MANAGER_GROUP_PREFIX.length());
-		}
-		
-		if (pid != null) {
-			if (pid.indexOf('/') != -1) {
-				return null; //something bogus on the end of the path so bail out now.
-			}
-			try {
-				Session session = resourceResolver.adaptTo(Session.class);
-				if (session != null) {
-					UserManager userManager = AccessControlUtil.getUserManager(session);
-					if (userManager != null) {
-						Authorizable authorizable = userManager.getAuthorizable(pid);
-						if (authorizable != null) {
-							//found the Authorizable, so return the resource that wraps it.
-							return new AuthorizableResource(authorizable, resourceResolver, path);
-						}
-					}
-				}
-			} catch (RepositoryException re) {
-				throw new SlingException("Error looking up Authorizable for principal: " + pid, re);
-			}
-		}
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.api.resource.ResourceProvider#getResource(org.apache
+     * .sling.api.resource.ResourceResolver, java.lang.String)
+     */
+    public Resource getResource(ResourceResolver resourceResolver, String path) {
+
+        // handle resources for the virtual container resources
+        if (path.equals(SYSTEM_USER_MANAGER_PATH)) {
+            return new SyntheticResource(resourceResolver, path,
+                "sling:userManager");
+        } else if (path.equals(SYSTEM_USER_MANAGER_USER_PATH)) {
+            return new SyntheticResource(resourceResolver, path, "sling:users");
+        } else if (path.equals(SYSTEM_USER_MANAGER_GROUP_PATH)) {
+            return new SyntheticResource(resourceResolver, path, "sling:groups");
+        }
+
+        // the principalId should be the first segment after the prefix
+        String pid = null;
+        if (path.startsWith(SYSTEM_USER_MANAGER_USER_PREFIX)) {
+            pid = path.substring(SYSTEM_USER_MANAGER_USER_PREFIX.length());
+        } else if (path.startsWith(SYSTEM_USER_MANAGER_GROUP_PREFIX)) {
+            pid = path.substring(SYSTEM_USER_MANAGER_GROUP_PREFIX.length());
+        }
+
+        if (pid != null) {
+            if (pid.indexOf('/') != -1) {
+                return null; // something bogus on the end of the path so bail
+                             // out now.
+            }
+            try {
+                Session session = resourceResolver.adaptTo(Session.class);
+                if (session != null) {
+                    UserManager userManager = AccessControlUtil.getUserManager(session);
+                    if (userManager != null) {
+                        Authorizable authorizable = userManager.getAuthorizable(pid);
+                        if (authorizable != null) {
+                            // found the Authorizable, so return the resource
+                            // that wraps it.
+                            return new AuthorizableResource(authorizable,
+                                resourceResolver, path);
+                        }
+                    }
+                }
+            } catch (RepositoryException re) {
+                throw new SlingException(
+                    "Error looking up Authorizable for principal: " + pid, re);
+            }
+        }
         return null;
-	}
-
-
-	/* (non-Javadoc)
-	 * @see org.apache.sling.api.resource.ResourceProvider#listChildren(org.apache.sling.api.resource.Resource)
-	 */
-	public Iterator<Resource> listChildren(Resource parent) {
-		if (parent == null) {
-			throw new NullPointerException("parent is null");
-		}
-		try {
-			String path = parent.getPath();
-			ResourceResolver resourceResolver = parent.getResourceResolver();
-
-			//handle children of /system/userManager
-			if (SYSTEM_USER_MANAGER_PATH.equals(path)) {
-				List<Resource> resources = new ArrayList<Resource>();
-				if (resourceResolver != null) {
-					resources.add(getResource(resourceResolver, SYSTEM_USER_MANAGER_USER_PATH));	
-					resources.add(getResource(resourceResolver, SYSTEM_USER_MANAGER_GROUP_PATH));	
-				}
-				return resources.iterator();
-			}
-			
-			int searchType = -1;
-			if (SYSTEM_USER_MANAGER_USER_PATH.equals(path)) {
-				searchType = PrincipalManager.SEARCH_TYPE_NOT_GROUP;
-			} else if (SYSTEM_USER_MANAGER_GROUP_PATH.equals(path)) {
-				searchType = PrincipalManager.SEARCH_TYPE_GROUP;
-			}
-			if (searchType != -1) {
-				PrincipalIterator principals = null;
-
-				//TODO: this actually does not work correctly since the jackrabbit findPrincipals API 
-				// currently does an exact match of the search filter so it won't match a wildcard
-				Session session = resourceResolver.adaptTo(Session.class);
-				if (session != null) {
-					PrincipalManager principalManager = AccessControlUtil.getPrincipalManager(session);
-					principals = principalManager.findPrincipals(".*", PrincipalManager.SEARCH_TYPE_NOT_GROUP);
-				}
-
-				
-				if (principals != null) {
-					return new ChildrenIterator(parent, principals);
-				}
-			}
-		} catch (RepositoryException re) {
-			throw new SlingException("Error listing children of resource: " + parent.getPath(), re);
-		}
-
-		return null;
-	}
-	
-	
-
-	private final class ChildrenIterator implements Iterator<Resource> {
-		private PrincipalIterator principals;
-		private Resource parent;
-
-		public ChildrenIterator(Resource parent, PrincipalIterator principals) {
-			this.parent = parent;
-			this.principals = principals;
-		}
-
-		public boolean hasNext() {
-			return principals.hasNext();
-		}
-
-		public Resource next() {
-			Principal nextPrincipal = principals.nextPrincipal();
-			try {
-				ResourceResolver resourceResolver = parent.getResourceResolver();
-				if (resourceResolver != null) {
-					Session session = resourceResolver.adaptTo(Session.class);
-					if (session != null) {
-						UserManager userManager = AccessControlUtil.getUserManager(session);
-						if (userManager != null) {
-							Authorizable authorizable = userManager.getAuthorizable(nextPrincipal.getName());
-							if (authorizable != null) {
-								String path;
-								if (authorizable.isGroup()) {
-									path = SYSTEM_USER_MANAGER_GROUP_PREFIX + nextPrincipal.getName();
-								} else {
-									path = SYSTEM_USER_MANAGER_USER_PREFIX + nextPrincipal.getName();
-								}
-								return new AuthorizableResource(authorizable, resourceResolver, path);
-							}
-						}
-					}
-				}
-			} catch (RepositoryException re) {
-                log.error("Exception while looking up authorizable resource.", re);
-			}
-			return null;
-		}
-
-		public void remove() {
-			throw new UnsupportedOperationException();
-		}
-	}
-	
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.apache.sling.api.resource.ResourceProvider#listChildren(org.apache
+     * .sling.api.resource.Resource)
+     */
+    public Iterator<Resource> listChildren(Resource parent) {
+        if (parent == null) {
+            throw new NullPointerException("parent is null");
+        }
+        try {
+            String path = parent.getPath();
+            ResourceResolver resourceResolver = parent.getResourceResolver();
+
+            // handle children of /system/userManager
+            if (SYSTEM_USER_MANAGER_PATH.equals(path)) {
+                List<Resource> resources = new ArrayList<Resource>();
+                if (resourceResolver != null) {
+                    resources.add(getResource(resourceResolver,
+                        SYSTEM_USER_MANAGER_USER_PATH));
+                    resources.add(getResource(resourceResolver,
+                        SYSTEM_USER_MANAGER_GROUP_PATH));
+                }
+                return resources.iterator();
+            }
+
+            int searchType = -1;
+            if (SYSTEM_USER_MANAGER_USER_PATH.equals(path)) {
+                searchType = PrincipalManager.SEARCH_TYPE_NOT_GROUP;
+            } else if (SYSTEM_USER_MANAGER_GROUP_PATH.equals(path)) {
+                searchType = PrincipalManager.SEARCH_TYPE_GROUP;
+            }
+            if (searchType != -1) {
+                PrincipalIterator principals = null;
+
+                // TODO: this actually does not work correctly since the
+                // jackrabbit findPrincipals API
+                // currently does an exact match of the search filter so it
+                // won't match a wildcard
+                Session session = resourceResolver.adaptTo(Session.class);
+                if (session != null) {
+                    PrincipalManager principalManager = AccessControlUtil.getPrincipalManager(session);
+                    principals = principalManager.findPrincipals(".*",
+                        PrincipalManager.SEARCH_TYPE_NOT_GROUP);
+                }
+
+                if (principals != null) {
+                    return new ChildrenIterator(parent, principals);
+                }
+            }
+        } catch (RepositoryException re) {
+            throw new SlingException("Error listing children of resource: "
+                + parent.getPath(), re);
+        }
+
+        return null;
+    }
+
+    private final class ChildrenIterator implements Iterator<Resource> {
+        private PrincipalIterator principals;
+
+        private Resource parent;
+
+        public ChildrenIterator(Resource parent, PrincipalIterator principals) {
+            this.parent = parent;
+            this.principals = principals;
+        }
+
+        public boolean hasNext() {
+            return principals.hasNext();
+        }
+
+        public Resource next() {
+            Principal nextPrincipal = principals.nextPrincipal();
+            try {
+                ResourceResolver resourceResolver = parent.getResourceResolver();
+                if (resourceResolver != null) {
+                    Session session = resourceResolver.adaptTo(Session.class);
+                    if (session != null) {
+                        UserManager userManager = AccessControlUtil.getUserManager(session);
+                        if (userManager != null) {
+                            Authorizable authorizable = userManager.getAuthorizable(nextPrincipal.getName());
+                            if (authorizable != null) {
+                                String path;
+                                if (authorizable.isGroup()) {
+                                    path = SYSTEM_USER_MANAGER_GROUP_PREFIX
+                                        + nextPrincipal.getName();
+                                } else {
+                                    path = SYSTEM_USER_MANAGER_USER_PREFIX
+                                        + nextPrincipal.getName();
+                                }
+                                return new AuthorizableResource(authorizable,
+                                    resourceResolver, path);
+                            }
+                        }
+                    }
+                }
+            } catch (RepositoryException re) {
+                log.error("Exception while looking up authorizable resource.",
+                    re);
+            }
+            return null;
+        }
+
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+    }
+
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java
index 3dafa19..88c7c1c 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java
@@ -45,10 +45,15 @@ import org.slf4j.LoggerFactory;
  */
 public class AuthorizableValueMap implements ValueMap {
     private Logger logger = LoggerFactory.getLogger(AuthorizableValueMap.class);
-    private Set<String> hiddenProperties = new HashSet<String>(Arrays.asList(new String[]{"rep:password", "jcr:uuid"}));
-	private boolean fullyRead;
+
+    private Set<String> hiddenProperties = new HashSet<String>(
+        Arrays.asList(new String[] { "rep:password", "jcr:uuid" }));
+
+    private boolean fullyRead;
+
     private final Map<String, Object> cache;
-	private Authorizable authorizable;
+
+    private Authorizable authorizable;
 
     public AuthorizableValueMap(Authorizable authorizable) {
         this.authorizable = authorizable;
@@ -56,17 +61,17 @@ public class AuthorizableValueMap implements ValueMap {
         this.fullyRead = false;
     }
 
-	@SuppressWarnings("unchecked")
-	public <T> T get(String name, Class<T> type) {
+    @SuppressWarnings("unchecked")
+    public <T> T get(String name, Class<T> type) {
         if (type == null) {
             return (T) get(name);
         }
 
         return convertToType(name, type);
-	}
+    }
 
-	@SuppressWarnings("unchecked")
-	public <T> T get(String name, T defaultValue) {
+    @SuppressWarnings("unchecked")
+    public <T> T get(String name, T defaultValue) {
         if (defaultValue == null) {
             return (T) get(name);
         }
@@ -81,51 +86,50 @@ public class AuthorizableValueMap implements ValueMap {
         }
 
         return value;
-	}
+    }
 
-	public boolean containsKey(Object key) {
+    public boolean containsKey(Object key) {
         return get(key) != null;
-	}
+    }
 
-	public boolean containsValue(Object value) {
+    public boolean containsValue(Object value) {
         readFully();
         return cache.containsValue(value);
-	}
+    }
 
-	public Set<java.util.Map.Entry<String, Object>> entrySet() {
+    public Set<java.util.Map.Entry<String, Object>> entrySet() {
         readFully();
         return cache.entrySet();
-	}
+    }
 
-	public Object get(Object key) {
+    public Object get(Object key) {
         Object value = cache.get(key);
         if (value == null) {
             value = read((String) key);
         }
 
         return value;
-	}
-
+    }
 
-	public Set<String> keySet() {
+    public Set<String> keySet() {
         readFully();
         return cache.keySet();
-	}
+    }
 
-	public int size() {
+    public int size() {
         readFully();
         return cache.size();
-	}
+    }
 
-	public boolean isEmpty() {
+    public boolean isEmpty() {
         return size() == 0;
-	}
+    }
 
-	public Collection<Object> values() {
+    public Collection<Object> values() {
         readFully();
         return cache.values();
-	}
-	
+    }
+
     protected Object read(String key) {
 
         // if the item has been completely read, we need not check
@@ -135,14 +139,14 @@ public class AuthorizableValueMap implements ValueMap {
         }
 
         if (hiddenProperties.contains(key)) {
-        	return null;
+            return null;
         }
-        
+
         try {
             if (authorizable.hasProperty(key)) {
                 Value[] property = authorizable.getProperty(key);
                 Object value = valuesToJavaObject(property);
-            	cache.put(key, value);
+                cache.put(key, value);
                 return value;
             }
         } catch (RepositoryException re) {
@@ -152,37 +156,38 @@ public class AuthorizableValueMap implements ValueMap {
         // property not found or some error accessing it
         return null;
     }
-    
-    protected Object valuesToJavaObject(Value [] values) throws RepositoryException {
+
+    protected Object valuesToJavaObject(Value[] values)
+            throws RepositoryException {
         if (values == null) {
-        	return null;
+            return null;
         } else if (values.length == 1) {
-        	return JcrResourceUtil.toJavaObject(values[0]);
+            return JcrResourceUtil.toJavaObject(values[0]);
         } else {
-        	Object [] valuesObjs = new Object[values.length];
-        	for (int i=0; i < values.length; i++) {
-        		valuesObjs[i] = JcrResourceUtil.toJavaObject(values[i]);
-        	}
-        	return valuesObjs;
+            Object[] valuesObjs = new Object[values.length];
+            for (int i = 0; i < values.length; i++) {
+                valuesObjs[i] = JcrResourceUtil.toJavaObject(values[i]);
+            }
+            return valuesObjs;
         }
     }
-	
+
     @SuppressWarnings("unchecked")
-	protected void readFully() {
+    protected void readFully() {
         if (!fullyRead) {
             try {
                 Iterator pi = authorizable.getPropertyNames();
                 while (pi.hasNext()) {
-                    String key = (String)pi.next();
+                    String key = (String) pi.next();
 
                     if (hiddenProperties.contains(key)) {
-                    	continue; //skip it.
+                        continue; // skip it.
                     }
 
                     if (!cache.containsKey(key)) {
-	                    Value[] property = authorizable.getProperty(key);
-	                    Object value = valuesToJavaObject(property);
-                    	cache.put(key, value);
+                        Value[] property = authorizable.getProperty(key);
+                        Object value = valuesToJavaObject(property);
+                        cache.put(key, value);
                     }
                 }
                 fullyRead = true;
@@ -191,24 +196,25 @@ public class AuthorizableValueMap implements ValueMap {
             }
         }
     }
-	
+
     // ---------- Unsupported Modification methods
-	
-	public Object remove(Object arg0) {
+
+    public Object remove(Object arg0) {
         throw new UnsupportedOperationException();
-	}
-	public void clear() {
+    }
+
+    public void clear() {
         throw new UnsupportedOperationException();
-	}
-	public Object put(String arg0, Object arg1) {
+    }
+
+    public Object put(String arg0, Object arg1) {
         throw new UnsupportedOperationException();
-	}
+    }
 
-	public void putAll(Map<? extends String, ? extends Object> arg0) {
+    public void putAll(Map<? extends String, ? extends Object> arg0) {
         throw new UnsupportedOperationException();
-	}	
-	
-	
+    }
+
     // ---------- Implementation helper
 
     @SuppressWarnings("unchecked")
@@ -220,9 +226,9 @@ public class AuthorizableValueMap implements ValueMap {
                 Value[] values = authorizable.getProperty(name);
 
                 if (values == null) {
-                	return null;
+                    return null;
                 }
-                
+
                 boolean multiValue = values.length > 1;
                 boolean array = type.isArray();
 
@@ -236,8 +242,8 @@ public class AuthorizableValueMap implements ValueMap {
                 } else {
                     Value value = values[0];
                     if (array) {
-                        result = (T) convertToArray(
-                            new Value[] { value }, type.getComponentType());
+                        result = (T) convertToArray(new Value[] { value },
+                            type.getComponentType());
                     } else {
                         result = convertToType(-1, value, type);
                     }
@@ -254,26 +260,26 @@ public class AuthorizableValueMap implements ValueMap {
         // fall back to nothing
         return result;
     }
-	
+
     private <T> T[] convertToArray(Value[] jcrValues, Class<T> type)
-    	throws ValueFormatException, RepositoryException {
-    	List<T> values = new ArrayList<T>();
-    	for (int i = 0; i < jcrValues.length; i++) {
-    		T value = convertToType(i, jcrValues[i], type);
-    		if (value != null) {
-    			values.add(value);
-    		}
-    	}
-
-    	@SuppressWarnings("unchecked")
-    	T[] result = (T[]) Array.newInstance(type, values.size());
-
-    	return values.toArray(result);
+            throws ValueFormatException, RepositoryException {
+        List<T> values = new ArrayList<T>();
+        for (int i = 0; i < jcrValues.length; i++) {
+            T value = convertToType(i, jcrValues[i], type);
+            if (value != null) {
+                values.add(value);
+            }
+        }
+
+        @SuppressWarnings("unchecked")
+        T[] result = (T[]) Array.newInstance(type, values.size());
+
+        return values.toArray(result);
     }
-    
+
     @SuppressWarnings("unchecked")
-    private <T> T convertToType(int index, Value jcrValue,
-            Class<T> type) throws ValueFormatException, RepositoryException {
+    private <T> T convertToType(int index, Value jcrValue, Class<T> type)
+            throws ValueFormatException, RepositoryException {
 
         if (String.class == type) {
             return (T) jcrValue.getString();
@@ -302,7 +308,7 @@ public class AuthorizableValueMap implements ValueMap {
         // fallback in case of unsupported type
         return null;
     }
-    
+
     private Class<?> normalizeClass(Class<?> type) {
         if (Calendar.class.isAssignableFrom(type)) {
             type = Calendar.class;
@@ -315,5 +321,5 @@ public class AuthorizableValueMap implements ValueMap {
         }
         return type;
     }
-	
+
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 20/28: Use official release instead of incubator release.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 36279544eba7426270f5595b9ee44a4ee13f3838
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Aug 17 14:28:27 2009 +0000

    Use official release instead of incubator release.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@804997 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 4fd957e..e7f748a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.0.4-incubator</version>
+            <version>2.0.6</version>
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 23/28: SLING-1208 As of Jackrabbit 1.6 the protected properties of the repository reflection of users and groups are not returned as Authorizable properties any more. Therefore the rep:principalName property which is checked in the integration test does not exist any longer. Likeweis the rep:password is not returned any more, so we have to use a (hacky) workaround.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 3e7a727c308c2face8127d7c65c68efa945120f8
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Wed Dec 2 13:55:59 2009 +0000

    SLING-1208 As of Jackrabbit 1.6 the protected properties of the repository reflection of users and groups are not returned as Authorizable properties any more. Therefore the rep:principalName property which is checked in the integration test does not exist any longer. Likeweis the rep:password is not returned any more, so we have to use a (hacky) workaround.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@886144 13f79535-47bb-0310-9956-ffa450edef68
---
 .../impl/post/AbstractUserPostServlet.java         | 21 +++++++---
 .../impl/post/ChangeUserPasswordServlet.java       | 47 ++++++++++++++++------
 .../impl/resource/AuthorizableValueMap.java        | 41 +++++++++++--------
 3 files changed, 76 insertions(+), 33 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
index 9f661ed..90071b3 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
@@ -33,7 +33,7 @@ public abstract class AbstractUserPostServlet extends
     /**
      * To be used for the encryption. E.g. for passwords in
      * {@link javax.jcr.SimpleCredentials#getPassword()} SimpleCredentials}
-     * 
+     *
      * @scr.property valueRef="DEFAULT_PASSWORD_DIGEST_ALGORITHM"
      */
     private static final String PROP_PASSWORD_DIGEST_ALGORITHM = "password.digest.algorithm";
@@ -64,17 +64,28 @@ public abstract class AbstractUserPostServlet extends
 
     /**
      * Digest the given password using the configured digest algorithm
-     * 
+     *
      * @param pwd the value to digest
      * @return the digested value
      * @throws IllegalArgumentException
      */
     protected String digestPassword(String pwd) throws IllegalArgumentException {
+        return digestPassword(pwd, passwordDigestAlgoritm);
+    }
+
+    /**
+     * Digest the given password using the given digest algorithm
+     *
+     * @param pwd the value to digest
+     * @param digest the digest algorithm to use for digesting
+     * @return the digested value
+     * @throws IllegalArgumentException
+     */
+    protected String digestPassword(String pwd, String digest) throws IllegalArgumentException {
         try {
             StringBuffer password = new StringBuffer();
-            password.append("{").append(passwordDigestAlgoritm).append("}");
-            password.append(Text.digest(passwordDigestAlgoritm,
-                pwd.getBytes("UTF-8")));
+            password.append("{").append(digest).append("}");
+            password.append(Text.digest(digest, pwd.getBytes("UTF-8")));
             return password.toString();
         } catch (NoSuchAlgorithmException e) {
             throw new IllegalArgumentException(e.toString());
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 1cd0c79..a741b2c 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -16,12 +16,13 @@
  */
 package org.apache.sling.jackrabbit.usermanager.impl.post;
 
+import java.lang.reflect.Method;
 import java.util.List;
 
+import javax.jcr.Credentials;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.Value;
-
+import javax.jcr.SimpleCredentials;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.User;
 import org.apache.sling.api.SlingHttpServletRequest;
@@ -125,17 +126,10 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet {
                 "New Password does not match the confirmation password");
         }
 
-        try {
-            String digestedOldPwd = digestPassword(oldPwd);
-            Value[] pwdProperty = ((User) authorizable).getProperty("rep:password");
-            if (pwdProperty != null && pwdProperty.length > 0) {
-                String repPasswordValue = pwdProperty[0].getString();
-                if (!digestedOldPwd.equals(repPasswordValue)) {
-                    // submitted oldPwd value is not correct.
-                    throw new RepositoryException("Old Password does not match");
-                }
-            }
+        // verify old password
+        checkPassword(authorizable, oldPwd);
 
+        try {
             ((User) authorizable).changePassword(digestPassword(newPwd));
 
             changes.add(Modification.onModified(resource.getPath()
@@ -144,4 +138,33 @@ public class ChangeUserPasswordServlet extends AbstractUserPostServlet {
             throw new RepositoryException("Failed to change user password.", re);
         }
     }
+
+    private void checkPassword(Authorizable authorizable, String oldPassword)
+            throws RepositoryException {
+        Credentials oldCreds = ((User) authorizable).getCredentials();
+        if (oldCreds instanceof SimpleCredentials) {
+            char[] oldCredsPwd = ((SimpleCredentials) oldCreds).getPassword();
+            if (oldPassword.equals(String.valueOf(oldCredsPwd))) {
+                return;
+            }
+        } else {
+            try {
+                // CryptSimpleCredentials.matches(SimpleCredentials credentials)
+                Class<?> oldCredsClass = oldCreds.getClass();
+                Method matcher = oldCredsClass.getMethod("matches",
+                    SimpleCredentials.class);
+                SimpleCredentials newCreds = new SimpleCredentials(
+                    authorizable.getPrincipal().getName(),
+                    oldPassword.toCharArray());
+                boolean match = (Boolean) matcher.invoke(oldCreds, newCreds);
+                if (match) {
+                    return;
+                }
+            } catch (Throwable t) {
+                // failure here, fall back to password check failure below
+            }
+        }
+
+        throw new RepositoryException("Old Password does not match");
+    }
 }
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
index b9761ed..f93834e 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
@@ -18,11 +18,9 @@ package org.apache.sling.jackrabbit.usermanager.impl.resource;
 
 import java.lang.reflect.Array;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.Date;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -46,8 +44,13 @@ import org.slf4j.LoggerFactory;
 public class AuthorizableValueMap implements ValueMap {
     private Logger logger = LoggerFactory.getLogger(AuthorizableValueMap.class);
 
-    private Set<String> hiddenProperties = new HashSet<String>(
-        Arrays.asList(new String[] { "rep:password", "jcr:uuid" }));
+    /**
+     * Principal Name property of the Authorizable. This has been returned
+     * before Jackrabbit 1.6 as part of the Authorizable properties but is
+     * now removed from the set. We add this to the properties again to be
+     * able to convey this data to the request.
+     */
+    private static final String REP_PRINCIPAL_NAME = "rep:principalName";
 
     private boolean fullyRead;
 
@@ -138,14 +141,18 @@ public class AuthorizableValueMap implements ValueMap {
             return null;
         }
 
-        if (hiddenProperties.contains(key)) {
-            return null;
-        }
-
         try {
-            if (authorizable.hasProperty(key)) {
-                Value[] property = authorizable.getProperty(key);
-                Object value = valuesToJavaObject(property);
+            final Object value;
+            if (REP_PRINCIPAL_NAME.equals(key)) {
+                value = authorizable.getPrincipal().getName();
+            } else  if (authorizable.hasProperty(key)) {
+                final Value[] property = authorizable.getProperty(key);
+                value = valuesToJavaObject(property);
+            } else {
+                value = null;
+            }
+
+            if (value != null) {
                 cache.put(key, value);
                 return value;
             }
@@ -179,17 +186,19 @@ public class AuthorizableValueMap implements ValueMap {
                 Iterator pi = authorizable.getPropertyNames();
                 while (pi.hasNext()) {
                     String key = (String) pi.next();
-
-                    if (hiddenProperties.contains(key)) {
-                        continue; // skip it.
-                    }
-
                     if (!cache.containsKey(key)) {
                         Value[] property = authorizable.getProperty(key);
                         Object value = valuesToJavaObject(property);
                         cache.put(key, value);
                     }
                 }
+
+                // add principal name
+                if (!cache.containsKey(REP_PRINCIPAL_NAME)) {
+                    cache.put(REP_PRINCIPAL_NAME,
+                        authorizable.getPrincipal().getName());
+                }
+
                 fullyRead = true;
             } catch (RepositoryException re) {
                 // TODO: log !!

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 14/28: SLING-1011 : Adjust svn location

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 0884ed70561379a3c79f509248b85ed53d53f117
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 10:26:35 2009 +0000

    SLING-1011 : Adjust svn location
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@786008 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 2 +-
 pom.xml    | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.txt b/README.txt
index 046bab8..10636b7 100644
--- a/README.txt
+++ b/README.txt
@@ -31,7 +31,7 @@ Subversion (http://subversion.tigris.org/) source repository of
 the Apache Software Foundation. If you have Subversion installed,
 you can checkout the latest source using the following command:
 
-    svn checkout http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+    svn checkout http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
 
 See the Subversion documentation for other source control features.
 
diff --git a/pom.xml b/pom.xml
index ece75fd..421f477 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,13 +38,13 @@
 
     <scm>
         <connection>
-            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
         </connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
         </developerConnection>
         <url>
-            http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager
         </url>
     </scm>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 12/28: Move Sling to new TLP location

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit b48249e3414f7713418c15ba56c6e27421925edf
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Thu Jun 18 09:21:02 2009 +0000

    Move Sling to new TLP location
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@785979 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 26/28: Update notice files.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit a8f060fca5258216f0679f5c49323a4f65ecc0bf
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Feb 12 15:44:23 2010 +0000

    Update notice files.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@909467 13f79535-47bb-0310-9956-ffa450edef68
---
 NOTICE                             | 2 +-
 src/main/resources/META-INF/NOTICE | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/NOTICE b/NOTICE
index 9f4ac5f..65bcdb8 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 Apache Sling Jackrabbit UserManager Support
-Copyright 2008-2009 The Apache Software Foundation
+Copyright 2008-2010 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/src/main/resources/META-INF/NOTICE b/src/main/resources/META-INF/NOTICE
index 9f4ac5f..65bcdb8 100644
--- a/src/main/resources/META-INF/NOTICE
+++ b/src/main/resources/META-INF/NOTICE
@@ -1,5 +1,5 @@
 Apache Sling Jackrabbit UserManager Support
-Copyright 2008-2009 The Apache Software Foundation
+Copyright 2008-2010 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 22/28: SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 9166924b8c4c94750456885b28aa565abb0c7e67
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Dec 1 07:32:34 2009 +0000

    SLING-1205 Upgrade all projects to parent POM 8 and use OSGi provided OSGi libraries
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@885680 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1c26098..55b1ca1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>6</version>
+        <version>8</version>
         <relativePath>../../../parent/pom.xml</relativePath>
     </parent>
 
@@ -100,11 +100,11 @@
             <version>1.5.0</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
+            <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix</groupId>
+            <groupId>org.osgi</groupId>
             <artifactId>org.osgi.compendium</artifactId>
         </dependency>
     </dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 11/28: Replace tabs by spaces, remove unneeded javadoc plugin configuration, remove empty bundle plugin configuration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 5fdd16cfb286df88bbe9e3e0cf47a3dc24dd187a
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Jun 9 11:31:56 2009 +0000

    Replace tabs by spaces, remove unneeded javadoc plugin configuration,
    remove empty bundle plugin configuration
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@782960 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 175 +++++++++++++++++++++++++++++-----------------------------------
 1 file changed, 79 insertions(+), 96 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7fadfae..ece75fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
     with the License.  You may obtain a copy of the License at
     
     http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,111 +18,94 @@
     under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.sling</groupId>
-		<artifactId>sling</artifactId>
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
         <version>5-incubator</version>
-		<relativePath>../../../parent/pom.xml</relativePath>
-	</parent>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
 
-	<artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
-	<packaging>bundle</packaging>
-	<version>2.0.3-incubator-SNAPSHOT</version>
-	<name>Apache Sling Jackrabbit UserManager Support</name>
-	<description>
-		Provides ResourceProvider and SlingPostOperations for the Jackrabbit
-		UserManager.
+    <artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
+    <packaging>bundle</packaging>
+    <version>2.0.3-incubator-SNAPSHOT</version>
+    <name>Apache Sling Jackrabbit UserManager Support</name>
+    <description>
+        Provides ResourceProvider and SlingPostOperations for the Jackrabbit
+        UserManager.
 	</description>
 
-	<scm>
-		<connection>
-			scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
-		</connection>
-		<developerConnection>
-			scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
-		</developerConnection>
-		<url>
-			http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
-		</url>
-	</scm>
+    <scm>
+        <connection>
+            scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+        </connection>
+        <developerConnection>
+            scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+        </developerConnection>
+        <url>
+            http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+        </url>
+    </scm>
 
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-scr-plugin</artifactId>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<extensions>true</extensions>
-				<configuration>
-					<instructions>
-						<Private-Package>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>
                             org.apache.sling.jackrabbit.usermanager.*
-						</Private-Package>
-						<Sling-Initial-Content />
-						<Sling-Nodetypes />
-					</instructions>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+                        </Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
-	<reporting>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<configuration>
-					<!-- No javadocs -->
-					<excludePackageNames>
-					    org.apache.sling.jackrabbit.usermanager.post.impl
-					</excludePackageNames>
-				</configuration>
-			</plugin>
-		</plugins>
-	</reporting>
-
-	<dependencies>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.sling</groupId>
-			<artifactId>org.apache.sling.api</artifactId>
-			<version>2.0.4-incubator</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.sling</groupId>
-			<artifactId>org.apache.sling.servlets.post</artifactId>
-			<version>2.0.4-incubator</version>
-		</dependency>
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.0.4-incubator</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.servlets.post</artifactId>
+            <version>2.0.4-incubator</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.jackrabbit</groupId>
             <artifactId>jackrabbit-api</artifactId>
             <version>1.5.0</version>
         </dependency>
-		<dependency>
-			<groupId>org.apache.sling</groupId>
-			<artifactId>org.apache.sling.jcr.base</artifactId>
-			<version>2.0.4-incubator</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.jackrabbit</groupId>
-			<artifactId>jackrabbit-api</artifactId>
-			<version>1.5.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.osgi.core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.felix</groupId>
-			<artifactId>org.osgi.compendium</artifactId>
-		</dependency>
-	</dependencies>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.jcr.base</artifactId>
+            <version>2.0.4-incubator</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.jackrabbit</groupId>
+            <artifactId>jackrabbit-api</artifactId>
+            <version>1.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 03/28: [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit c7de9aca46315ee58c5f909a3333ddde9ace8720
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed May 6 13:15:45 2009 +0000

    [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@772220 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5db5fc4..b56815e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
 	<artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
 	<packaging>bundle</packaging>
-	<version>2.0.1-incubator-SNAPSHOT</version>
+	<version>2.0.2-incubator</version>
 	<name>Apache Sling Jackrabbit UserManager Support</name>
 	<description>
 		Provides ResourceProvider and SlingPostOperations for the Jackrabbit
@@ -38,13 +38,13 @@
 
 	<scm>
 		<connection>
-			scm:svn:http://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+			scm:svn:http://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
 		</connection>
 		<developerConnection>
-			scm:svn:https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+			scm:svn:https://svn.apache.org/repos/asf/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
 		</developerConnection>
 		<url>
-			http://svn.apache.org/viewvc/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager
+			http://svn.apache.org/viewvc/incubator/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.2-incubator
 		</url>
 	</scm>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 10/28: Remove empty folder

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 62307ef847143e95399ab3ea938549ce25cd5a02
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Jun 9 10:53:46 2009 +0000

    Remove empty folder
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@782953 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 08/28: SLING-995 Applying patch by Ian Boston (thanks)

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 3a343977faa1797e38d09c6928155ffe768ec6b9
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Jun 9 10:25:51 2009 +0000

    SLING-995 Applying patch by Ian Boston (thanks)
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@782947 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/jackrabbit/usermanager/resource/AuthorizableResource.java | 4 ++--
 .../usermanager/resource/AuthorizableResourceProvider.java          | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
index aac15c5..39b7559 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
@@ -49,9 +49,9 @@ public class AuthorizableResource extends SlingAdaptable implements Resource {
         this.authorizable = authorizable;
         this.path = path;
         if (authorizable.isGroup()) {
-            this.resourceType = "sling:group";
+            this.resourceType = "sling/group";
         } else {
-            this.resourceType = "sling:user";
+            this.resourceType = "sling/user";
         }
 
         this.metadata = new ResourceMetadata();
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
index b1eeb13..fd5b953 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
@@ -93,11 +93,11 @@ public class AuthorizableResourceProvider implements ResourceProvider {
         // handle resources for the virtual container resources
         if (path.equals(SYSTEM_USER_MANAGER_PATH)) {
             return new SyntheticResource(resourceResolver, path,
-                "sling:userManager");
+                "sling/userManager");
         } else if (path.equals(SYSTEM_USER_MANAGER_USER_PATH)) {
-            return new SyntheticResource(resourceResolver, path, "sling:users");
+            return new SyntheticResource(resourceResolver, path, "sling/users");
         } else if (path.equals(SYSTEM_USER_MANAGER_GROUP_PATH)) {
-            return new SyntheticResource(resourceResolver, path, "sling:groups");
+            return new SyntheticResource(resourceResolver, path, "sling/groups");
         }
 
         // the principalId should be the first segment after the prefix

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 05/28: Use next parent pom for development.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 87eba808cbd288a64f5b0a2a32224b9f13c20874
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu May 7 12:04:44 2009 +0000

    Use next parent pom for development.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@772627 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7fadfae..06c60f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
 	<parent>
 		<groupId>org.apache.sling</groupId>
 		<artifactId>sling</artifactId>
-        <version>5-incubator</version>
+        <version>6-incubator-SNAPSHOT</version>
 		<relativePath>../../../parent/pom.xml</relativePath>
 	</parent>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 19/28: SLING-1067 Fixed by checking the session cound to the request to see if its an administrator. If the user is an administrator they can register other users.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 85ff3134edec52786c7f010605578e709c9487a3
Author: Ian Boston <ie...@apache.org>
AuthorDate: Thu Jul 30 20:43:43 2009 +0000

    SLING-1067
    Fixed by checking the session cound to the request to see if its an administrator. If the user is an administrator they can register other users.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@799437 13f79535-47bb-0310-9956-ffa450edef68
---
 .../usermanager/impl/post/CreateUserServlet.java         | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index ca62a85..f591e5b 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -166,8 +166,22 @@ public class CreateUserServlet extends AbstractUserPostServlet {
     protected void handleOperation(SlingHttpServletRequest request,
             HtmlResponse response, List<Modification> changes)
             throws RepositoryException {
+      
+        // check for an administrator
+        boolean administrator = false;
+        try {
+            Session currentSession = request.getResourceResolver().adaptTo(Session.class);
+            UserManager um = AccessControlUtil.getUserManager(currentSession);
+            User currentUser = (User) um.getAuthorizable(currentSession.getUserID());
+            administrator = currentUser.isAdmin();
+        } catch ( Exception ex ) {
+            log.warn("Failed to determin if the user is an admin, assuming not. Cause: "+ex.getMessage());
+            administrator = false;
+        }
+            
+      
         // make sure user self-registration is enabled
-        if (!selfRegistrationEnabled) {
+        if (!administrator && !selfRegistrationEnabled) {
             throw new RepositoryException(
                 "Sorry, registration of new users is not currently enabled.  Please try again later.");
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 13/28: SLING-1011 : Remove disclaimer file.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 1d4d4dbee6a28856e1ecf82d12ce757f20c7dcb0
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jun 18 09:57:04 2009 +0000

    SLING-1011 : Remove disclaimer file.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@785993 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/resources/META-INF/DISCLAIMER | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/main/resources/META-INF/DISCLAIMER b/src/main/resources/META-INF/DISCLAIMER
deleted file mode 100644
index 90850c2..0000000
--- a/src/main/resources/META-INF/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Sling is an effort undergoing incubation at The Apache Software Foundation (ASF),
-sponsored by the Apache Jackrabbit PMC. Incubation is required of all newly accepted
-projects until a further review indicates that the infrastructure, communications,
-and decision making process have stabilized in a manner consistent with other
-successful ASF projects. While incubation status is not necessarily a reflection of
-the completeness or stability of the code, it does indicate that the project has yet
-to be fully endorsed by the ASF.
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 27/28: [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 1b53876345ab35e5c65f6090b704d0c7838765ea
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Sat Feb 13 19:59:30 2010 +0000

    [maven-release-plugin] prepare release org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@909883 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 70948a9..54b4528 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.jcr.jackrabbit.usermanager</artifactId>
     <packaging>bundle</packaging>
-    <version>2.0.3-SNAPSHOT</version>
+    <version>2.0.4</version>
     <name>Apache Sling Jackrabbit UserManager Support</name>
     <description>
         Provides ResourceProvider and SlingPostOperations for the Jackrabbit
@@ -38,13 +38,13 @@
 
     <scm>
         <connection>
-            scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
         </connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
         </developerConnection>
         <url>
-            http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager
+            http://svn.apache.org/viewvc/sling/tags/org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
         </url>
     </scm>
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-jcr-jackrabbit-usermanager] 09/28: Refactor everything below a "private" impl package. This clearly indicates that nothing contained in this bundle is intended to be exported.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git

commit 80ad2b5b9bb9138e4ec1563f16af2106c733cf28
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Tue Jun 9 10:50:24 2009 +0000

    Refactor everything below a "private" impl package. This clearly
    indicates that nothing contained in this bundle is intended to
    be exported.
    
    git-svn-id: https://svn.apache.org/repos/asf/incubator/sling/trunk/bundles/jcr/jackrabbit-usermanager@782950 13f79535-47bb-0310-9956-ffa450edef68
---
 .../usermanager/{post/impl => impl/helper}/DateParser.java        | 2 +-
 .../usermanager/{post/impl => impl/helper}/RequestProperty.java   | 2 +-
 .../{ => impl}/post/AbstractAuthorizablePostServlet.java          | 8 ++++----
 .../usermanager/{ => impl}/post/AbstractGroupPostServlet.java     | 4 ++--
 .../usermanager/{ => impl}/post/AbstractUserPostServlet.java      | 2 +-
 .../usermanager/{ => impl}/post/ChangeUserPasswordServlet.java    | 2 +-
 .../usermanager/{ => impl}/post/CreateGroupServlet.java           | 6 +++---
 .../jackrabbit/usermanager/{ => impl}/post/CreateUserServlet.java | 6 +++---
 .../usermanager/{ => impl}/post/DeleteAuthorizableServlet.java    | 2 +-
 .../usermanager/{ => impl}/post/UpdateGroupServlet.java           | 4 ++--
 .../jackrabbit/usermanager/{ => impl}/post/UpdateUserServlet.java | 4 ++--
 .../usermanager/{ => impl}/resource/AuthorizableResource.java     | 2 +-
 .../{ => impl}/resource/AuthorizableResourceProvider.java         | 2 +-
 .../usermanager/{ => impl}/resource/AuthorizableValueMap.java     | 2 +-
 14 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/DateParser.java
similarity index 98%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/DateParser.java
index c2f4769..e67c5df 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/DateParser.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/DateParser.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post.impl;
+package org.apache.sling.jackrabbit.usermanager.impl.helper;
 
 import java.text.DateFormat;
 import java.text.ParseException;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/RequestProperty.java
similarity index 99%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/RequestProperty.java
index 481ab41..8a99c1d 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/impl/RequestProperty.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/helper/RequestProperty.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post.impl;
+package org.apache.sling.jackrabbit.usermanager.impl.helper;
 
 import org.apache.sling.api.request.RequestParameter;
 import org.apache.sling.api.resource.ResourceUtil;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
similarity index 98%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
index 412d0f2..ba6b288 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractAuthorizablePostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -44,9 +44,9 @@ import org.apache.sling.api.servlets.HtmlResponse;
 import org.apache.sling.api.servlets.SlingAllMethodsServlet;
 import org.apache.sling.api.wrappers.SlingRequestPaths;
 import org.apache.sling.commons.osgi.OsgiUtil;
-import org.apache.sling.jackrabbit.usermanager.post.impl.DateParser;
-import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
-import org.apache.sling.jackrabbit.usermanager.resource.AuthorizableResourceProvider;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.DateParser;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
+import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 import org.osgi.service.component.ComponentContext;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
similarity index 96%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
index 1c677d6..d70cb24 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractGroupPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractGroupPostServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.List;
 
@@ -25,7 +25,7 @@ import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
-import org.apache.sling.jackrabbit.usermanager.resource.AuthorizableResourceProvider;
+import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
 
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
similarity index 98%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
index 87cf907..9f661ed 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/AbstractUserPostServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractUserPostServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.io.UnsupportedEncodingException;
 import java.security.NoSuchAlgorithmException;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
similarity index 98%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
index 118f6aa..a4c6d22 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/ChangeUserPasswordServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/ChangeUserPasswordServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.List;
 
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
similarity index 95%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
index 67814ba..17d89e3 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateGroupServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.security.Principal;
 import java.util.List;
@@ -28,8 +28,8 @@ import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.servlets.HtmlResponse;
-import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
-import org.apache.sling.jackrabbit.usermanager.resource.AuthorizableResourceProvider;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
+import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.servlets.post.Modification;
 import org.apache.sling.servlets.post.SlingPostConstants;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
similarity index 97%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
index 7d0c9af..20135b1 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/CreateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/CreateUserServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.Dictionary;
 import java.util.List;
@@ -28,8 +28,8 @@ import org.apache.jackrabbit.api.security.user.User;
 import org.apache.jackrabbit.api.security.user.UserManager;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.servlets.HtmlResponse;
-import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
-import org.apache.sling.jackrabbit.usermanager.resource.AuthorizableResourceProvider;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
+import org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResourceProvider;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
 import org.apache.sling.servlets.post.Modification;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
similarity index 99%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
index 44d6a7b..c7fd71c 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/DeleteAuthorizableServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/DeleteAuthorizableServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.Iterator;
 import java.util.List;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
similarity index 96%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
index 5c06cf1..7354d23 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateGroupServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateGroupServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.List;
 import java.util.Map;
@@ -27,7 +27,7 @@ import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.servlets.HtmlResponse;
-import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
similarity index 96%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
index 70d0501..b896eb1 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/post/UpdateUserServlet.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/UpdateUserServlet.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.post;
+package org.apache.sling.jackrabbit.usermanager.impl.post;
 
 import java.util.List;
 import java.util.Map;
@@ -27,7 +27,7 @@ import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceNotFoundException;
 import org.apache.sling.api.servlets.HtmlResponse;
-import org.apache.sling.jackrabbit.usermanager.post.impl.RequestProperty;
+import org.apache.sling.jackrabbit.usermanager.impl.helper.RequestProperty;
 import org.apache.sling.servlets.post.Modification;
 
 /**
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
similarity index 98%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
index 39b7559..9d44008 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResource.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResource.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.resource;
+package org.apache.sling.jackrabbit.usermanager.impl.resource;
 
 import java.util.Map;
 
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
similarity index 99%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
index fd5b953..f9aef30 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableResourceProvider.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableResourceProvider.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.resource;
+package org.apache.sling.jackrabbit.usermanager.impl.resource;
 
 import java.security.Principal;
 import java.util.ArrayList;
diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
similarity index 99%
rename from src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java
rename to src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
index 88c7c1c..b9761ed 100644
--- a/src/main/java/org/apache/sling/jackrabbit/usermanager/resource/AuthorizableValueMap.java
+++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sling.jackrabbit.usermanager.resource;
+package org.apache.sling.jackrabbit.usermanager.impl.resource;
 
 import java.lang.reflect.Array;
 import java.util.ArrayList;

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.