jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1401206 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/user/UserValidator.java spi/security/user/action/AuthorizableAction.java
Date Tue, 23 Oct 2012 08:59:46 GMT
Author: angela
Date: Tue Oct 23 08:59:46 2012
New Revision: 1401206

URL: http://svn.apache.org/viewvc?rev=1401206&view=rev
Log:
OAK-50 : Implement User Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidator.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableAction.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidator.java?rev=1401206&r1=1401205&r2=1401206&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserValidator.java
Tue Oct 23 08:59:46 2012
@@ -97,6 +97,11 @@ class UserValidator extends DefaultValid
         }
         if (authRoot != null) {
             assertHierarchy(node, authRoot);
+            // assert rep:principalName is present (that should actually by covered
+            // by node type validator)
+            if (node.getString(REP_PRINCIPAL_NAME, null) == null) {
+                fail("Mandatory property rep:principalName missing.");
+            }
         }
         return new UserValidator(null, node, provider);
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableAction.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableAction.java?rev=1401206&r1=1401205&r2=1401206&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableAction.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/AuthorizableAction.java
Tue Oct 23 08:59:46 2012
@@ -35,6 +35,10 @@ import org.apache.jackrabbit.oak.api.Roo
  * <li>{@link #onPasswordChange User password modification}.</li>
  * </ul>
  *
+ * Note, that in contrast to {@link org.apache.jackrabbit.oak.spi.commit.Validator}
+ * the authorizable actions will only be enforced when user related content
+ * modifications are generated by using the user management API.
+ *
  * @see org.apache.jackrabbit.oak.spi.security.ConfigurationParameters
  */
 public interface AuthorizableAction {
@@ -43,7 +47,7 @@ public interface AuthorizableAction {
     /**
      * Allows to add application specific modifications or validation associated
      * with the creation of a new group. Note, that this method is called
-     * <strong>before</strong> any {@code Session.save} call.
+     * <strong>before</strong> any {@code Session#save} call.
      *
      * @param group The new group that has not yet been persisted;
      * e.g. the associated node is still 'NEW'.
@@ -55,7 +59,7 @@ public interface AuthorizableAction {
     /**
      * Allows to add application specific modifications or validation associated
      * with the creation of a new group. Note, that this method is called
-     * <strong>before</strong> any {@code Session.save} call.
+     * <strong>before</strong> any {@code Root#commit()} call.
      *
      * @param group The new group that has not yet been persisted;
      * e.g. the associated node is still 'NEW'.
@@ -67,7 +71,7 @@ public interface AuthorizableAction {
     /**
      * Allows to add application specific modifications or validation associated
      * with the creation of a new user. Note, that this method is called
-     * <strong>before</strong> any {@code Session.save} call.
+     * <strong>before</strong> any {@code Session#save} call.
      *
      * @param user The new user that has not yet been persisted;
      * e.g. the associated node is still 'NEW'.
@@ -80,7 +84,7 @@ public interface AuthorizableAction {
     /**
      * Allows to add application specific modifications or validation associated
      * with the creation of a new user. Note, that this method is called
-     * <strong>before</strong> any {@code Session.save} call.
+     * <strong>before</strong> any {@code Root#commit()} call.
      *
      * @param user The new user that has not yet been persisted;
      * e.g. the associated node is still 'NEW'.



Mime
View raw message