Package br.gov.frameworkdemoiselle.security

Examples of br.gov.frameworkdemoiselle.security.AuthorizationException


      getLogger().trace(getBundle().getString("access-checking", username, operation, resource));
    }

    if (!getSecurityContext().hasPermission(resource, operation)) {
      getLogger().error(getBundle().getString("access-denied", username, operation, resource));
      throw new AuthorizationException(getBundle().getString("access-denied-ui", resource, operation));
    }

    getLogger().debug(getBundle().getString("access-allowed", username, operation, resource));
    return ic.proceed();
  }
View Full Code Here


    if (userRoles.isEmpty()) {
      getLogger().error(
          getBundle().getString("does-not-have-role", getSecurityContext().getCurrentUser().getName(), roles));

      @SuppressWarnings("unused")
      AuthorizationException a = new AuthorizationException(null);
      throw new AuthorizationException(getBundle().getString("does-not-have-role-ui", roles));
    }

    getLogger().debug(getBundle().getString("user-has-role", getSecurityContext().getCurrentUser().getName(), userRoles));

    return ic.proceed();
View Full Code Here

      getLogger().trace(getBundle().getString("access-checking", username, operation, resource));
    }

    if (!getSecurityContext().hasPermission(resource, operation)) {
      getLogger().error(getBundle().getString("access-denied", username, operation, resource));
      throw new AuthorizationException(getBundle().getString("access-denied-ui", resource, operation));
    }

    getLogger().debug(getBundle().getString("access-allowed", username, operation, resource));
    return ic.proceed();
  }
View Full Code Here

    if (userRoles.isEmpty()) {
      getLogger().error(
          getBundle().getString("does-not-have-role", getSecurityContext().getUser().getId(), roles));

      @SuppressWarnings("unused")
      AuthorizationException a = new AuthorizationException(null);
      throw new AuthorizationException(getBundle().getString("does-not-have-role-ui", roles));
    }

    getLogger().debug(getBundle().getString("user-has-role", getSecurityContext().getUser().getId(), userRoles));

    return ic.proceed();
View Full Code Here

      } catch (DemoiselleException cause) {
        throw cause;

      } catch (Exception cause) {
        throw new AuthorizationException(cause);
      }
    }

    return result;
  }
View Full Code Here

      } catch (DemoiselleException cause) {
        throw cause;

      } catch (Exception cause) {
        throw new AuthorizationException(cause);
      }
    }

    return result;
  }
View Full Code Here

public class AuthorizationBean implements Serializable {

  private static final long serialVersionUID = 1L;

  public String getThrowExceptionMessage() {
    throw new AuthorizationException("Authorization Exception!");
  }
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.security.AuthorizationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.