Package org.apache.shiro.subject

Examples of org.apache.shiro.subject.Subject.checkPermission()


    RequiresPermissions rpAnnotation = (RequiresPermissions) annotation;
    String[] perms = rpAnnotation.value();

    if (perms.length == 1) {
      subject.checkPermission(perms[0]);
      return;
    }
    if (Logical.AND.equals(rpAnnotation.logical())) {
      getSubject().checkPermissions(perms);
      return;
View Full Code Here


        if (subject.isPermitted(permission))
          hasAtLeastOnePermission = true;
      // Cause the exception if none of the role match, note that the
      // exception message will be a bit misleading
      if (!hasAtLeastOnePermission)
        subject.checkPermission(perms[0]);

    }

  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.