X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsecurity%2Fauthorization%2FAuthorizationRule.java;h=709591df65f9abcd244b4e7fb2f031fc0c4147ed;hb=f4f8467b507b7bb401e4ad0749ea426208831846;hp=46ef04b95dcf748034de3a42204be6fff7d1554a;hpb=03b34d260efda9f7df9fe35a703acd83c0cfe317;p=utils diff --git a/security/impl/src/main/java/org/wamblee/security/authorization/AuthorizationRule.java b/security/impl/src/main/java/org/wamblee/security/authorization/AuthorizationRule.java index 46ef04b9..709591df 100644 --- a/security/impl/src/main/java/org/wamblee/security/authorization/AuthorizationRule.java +++ b/security/impl/src/main/java/org/wamblee/security/authorization/AuthorizationRule.java @@ -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