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
* @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
*
* @return Array of supported types.
*/
- public abstract Class[] getSupportedTypes();
+ Class[] getSupportedTypes();
/**
* Determines whether an operation is allowed on a certain resource. The
*
* @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