Package org.jboss.errai.security.shared.api.identity

Examples of org.jboss.errai.security.shared.api.identity.Role


*/
public abstract class SecurityInterceptor {

  protected boolean hasAllRoles(Collection<Role> roles, String[] roleNames) {
    for (String roleName : roleNames) {
      final Role role = new Role(roleName);
      if (!roles.contains(role)) {
        return false;
      }
    }

View Full Code Here


    if (identity.isLoggedIn()) {
      RelationshipQuery<Grant> query =
              relationshipManager.createRelationshipQuery(Grant.class);
      query.setParameter(Grant.ASSIGNEE, identity.getAccount());
      for (final Grant grant : query.getResultList()) {
        roles.add(new Role(grant.getRole().getName()));
      }
    }

    return roles;
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.security.shared.api.identity.Role

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.