now using the simplified user management interface.
[utils] / security / impl / src / main / java / org / wamblee / security / authorization / AuthorizationRule.java
index 46ef04b95dcf748034de3a42204be6fff7d1554a..709591df65f9abcd244b4e7fb2f031fc0c4147ed 100644 (file)
@@ -16,6 +16,7 @@
 package org.wamblee.security.authorization;
 
 import org.wamblee.security.authentication.User;
+import org.wamblee.security.authentication.UserAdministration;
 
 /**
  * Represents an authorization rule to determine whether an operation is allowed
@@ -24,6 +25,12 @@ import org.wamblee.security.authentication.User;
  * @author Erik Brakkee
  */
 public interface AuthorizationRule {
+    
+    /**
+     * Sets the user admnistration to use. 
+     * @param aAdmin User administration. 
+     */
+    void setUserAdministration(UserAdministration aAdmin); 
 
     /**
      * Returns the supported object types for which this authorization rule
@@ -31,7 +38,7 @@ public interface AuthorizationRule {
      * 
      * @return Array of supported types.
      */
-    public abstract Class[] getSupportedTypes();
+    Class[] getSupportedTypes();
 
     /**
      * Determines whether an operation is allowed on a certain resource. The
@@ -48,7 +55,7 @@ public interface AuthorizationRule {
      * 
      * @return Authorization result.
      */
-    public abstract AuthorizationResult isAllowed(Object aResource,
-        Operation aOperation, User aUser);
+    AuthorizationResult isAllowed(Object aResource,
+        Operation aOperation, String aUser);
 
 }
\ No newline at end of file