1
0
mirror of synced 2026-08-04 01:07:02 +00:00

OPEN - issue SEC-1136: Removed SpringSecurityException. Introduced new AclException as base class for Acl module. Refactored JAAS authentication to map to AuthenticationExcpetions rather than SpringSecurityException. Modified ExceptionTranslationFilter to look explicitly for AuthenticationException or AccessDeniedException (which it should do since these are the only two it handles).

This commit is contained in:
Luke Taylor
2009-04-13 14:56:49 +00:00
parent ca7d055c2b
commit 10673780db
19 changed files with 80 additions and 67 deletions
@@ -0,0 +1,34 @@
package org.springframework.security.acls;
import org.springframework.core.NestedRuntimeException;
/**
* Abstract superclass for all exceptions thrown in the acls package and subpackages.
*
* @author Luke Taylor
* @version $Id$
* @since 2.5
*/
public abstract class AclException extends NestedRuntimeException {
/**
* Constructs an <code>AclException</code> with the specified
* message and root cause.
*
* @param msg the detail message
* @param t the root cause
*/
public AclException(String msg, Throwable cause) {
super(msg, cause);
}
/**
* Constructs an <code>AclException</code> with the specified
* message and no root cause.
*
* @param msg the detail message
*/
public AclException(String msg) {
super(msg);
}
}
@@ -14,16 +14,13 @@
*/
package org.springframework.security.acls;
import org.springframework.security.core.SpringSecurityException;
/**
* Thrown if an <code>Acl</code> entry already exists for the object.
*
* @author Ben Alex
* @version $Id$
*/
public class AlreadyExistsException extends SpringSecurityException {
public class AlreadyExistsException extends AclException {
//~ Constructors ===================================================================================================
/**
@@ -14,16 +14,13 @@
*/
package org.springframework.security.acls;
import org.springframework.security.core.SpringSecurityException;
/**
* Thrown if an {@link Acl} cannot be deleted because children <code>Acl</code>s exist.
*
* @author Ben Alex
* @version $Id$
*/
public class ChildrenExistException extends SpringSecurityException {
public class ChildrenExistException extends AclException {
//~ Constructors ===================================================================================================
/**
@@ -14,16 +14,13 @@
*/
package org.springframework.security.acls;
import org.springframework.security.core.SpringSecurityException;
/**
* Thrown if an ACL identity could not be extracted from an object.
*
* @author Ben Alex
* @version $Id$
*/
public class IdentityUnavailableException extends SpringSecurityException {
public class IdentityUnavailableException extends AclException {
//~ Constructors ===================================================================================================
/**
@@ -14,16 +14,13 @@
*/
package org.springframework.security.acls;
import org.springframework.security.core.SpringSecurityException;
/**
* Thrown if an ACL-related object cannot be found.
*
* @author Ben Alex
* @version $Id$
*/
public class NotFoundException extends SpringSecurityException {
public class NotFoundException extends AclException {
//~ Constructors ===================================================================================================
/**
@@ -14,9 +14,6 @@
*/
package org.springframework.security.acls;
import org.springframework.security.core.SpringSecurityException;
/**
* Thrown if an {@link Acl} cannot perform an operation because it only loaded a subset of <code>Sid</code>s and
* the caller has requested details for an unloaded <code>Sid</code>.
@@ -24,7 +21,7 @@ import org.springframework.security.core.SpringSecurityException;
* @author Ben Alex
* @version $Id$
*/
public class UnloadedSidException extends SpringSecurityException {
public class UnloadedSidException extends AclException {
//~ Constructors ===================================================================================================
/**