Example usage for org.apache.shiro.authz UnauthorizedException UnauthorizedException

List of usage examples for org.apache.shiro.authz UnauthorizedException UnauthorizedException

Introduction

In this page you can find the example usage for org.apache.shiro.authz UnauthorizedException UnauthorizedException.

Prototype

public UnauthorizedException(String message, Throwable cause) 

Source Link

Document

Constructs a new UnauthorizedException.

Usage

From source file:com.axelor.auth.AuthSecurity.java

License:Open Source License

@Override
public void check(AccessType type, Class<? extends Model> model, Long... ids) {
    if (isPermitted(type, model, ids)) {
        return;/*w w w.j  a  va2  s  . co  m*/
    }
    final AuthSecurityException cause = new AuthSecurityException(type, model, ids);
    throw new UnauthorizedException(type.getMessage(), cause);
}