Package org.jboss.errai.security.shared

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


    if (identity.isLoggedIn()) {
      IdentityQuery<org.picketlink.idm.model.Role> query =
              identityManager.createIdentityQuery(org.picketlink.idm.model.Role.class);
      query.setParameter(org.picketlink.idm.model.Role.ROLE_OF, identity.getAgent());
      for (org.picketlink.idm.model.Role role : query.getResultList()) {
        roles.add(new Role(role.getName()));
      }
    }

    return roles;
  }
View Full Code Here


  public void hasPermission(final AsyncCallback<Boolean> callback, final String... roleNames) {
    MessageBuilder.createCall(new RemoteCallback<List<Role>>() {
      @Override
      public void callback(List<Role> roles) {
        for (String roleName : roleNames) {
          final Role role = new Role(roleName);
          if (!roles.contains(role)) {
            callback.onSuccess(false);
            return;
          }
        }
View Full Code Here

TOP

Related Classes of org.jboss.errai.security.shared.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.