Package br.com.caelum.brutauth.auth.rules

Examples of br.com.caelum.brutauth.auth.rules.SimpleBrutauthRule


  }

  private boolean rulesAllows(Class<? extends SimpleBrutauthRule>[] rules,
      long permissionData) {
    for (Class<? extends SimpleBrutauthRule> permission : rules) {
      SimpleBrutauthRule rule = container.instanceFor(permission);
      RuleHandler handler = handlers.getHandler(rule);
      if(!rule.isAllowed(permissionData)){
        handler.handle();
        return false;
      }
    }
    return true;
View Full Code Here


    Arrays.asList(method.getMethod().getAnnotations());
    if (method.containsAnnotation(AccessLevel.class)) {
      permissionData = method.getMethod().getAnnotation(AccessLevel.class).value();
    }
    for (Class<? extends SimpleBrutauthRule> permission : permissions) {
      SimpleBrutauthRule rule = container.instanceFor(permission);
      RuleHandler handler = handlers.getHandler(rule);
      if(!rule.isAllowed(permissionData)){
        handler.handle();
        return;
      }
    }
    stack.next(method, resourceInstance);
View Full Code Here

TOP

Related Classes of br.com.caelum.brutauth.auth.rules.SimpleBrutauthRule

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.