Examples of EntityIdentifier


Examples of org.jasig.portal.EntityIdentifier

   
    if (StringUtils.isBlank(entityId)) {
      return new ModelAndView("jsonView", "error", "No entityId specified.");
    }

    EntityIdentifier ei = person.getEntityIdentifier();
      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
      if (!ap.hasPermission("org.jasig.portal.channels.groupsmanager.CGroupsManager", "VIEW", entityId)) {
      throw new AuthorizationException("User " + person.getUserName() +
          " does not have view permissions on entity " + entityId);
    }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

}
public PermissionSetImpl(IPermission[] perms, String key, Class type)
{
    super();
    permissions = perms;
    entityIdentifier = new EntityIdentifier(key, type);
}
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

  public int getExpirerId() {
    return this.expirerId;
  }

  public EntityIdentifier getEntityIdentifier() {
    return new EntityIdentifier(String.valueOf(this.getId()),
        ChannelDefinitionImpl.class);
  }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

       * as belonging to a category and adds them to the top-level of the
       * registry, assuming the current user has manage permissions.
       */
     
    if (type.equals(TYPE_MANAGE)) {
        EntityIdentifier ei = user.getEntityIdentifier();
          IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());

          for (IChannelDefinition channel : allChannels) {
              if (ap.canManage(channel.getId())) {
                  registry.addChannel(new ChannelBean(channel));
              }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

        {
            File[] files = ((File)itr.next()).listFiles(filter);
            for ( int filesIdx=0; filesIdx<files.length; filesIdx++ )
            {
                String key = getKeyFromFile(files[filesIdx]);
                EntityIdentifier ei = new EntityIdentifier(key, EntityTypes.GROUP_ENTITY_TYPE);
                ids.add(ei);
            }
        }
    }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

        if (ilfRoot.getAttribute(Constants.ATT_ID) != null)
            ilfRoot.setIdAttribute(Constants.ATT_ID, true);

        // build the auth principal for determining if pushed channels can be
        // used by this user
        EntityIdentifier ei = person.getEntityIdentifier();
        AuthorizationService authS = AuthorizationService.instance();
        IAuthorizationPrincipal ap = authS.newPrincipal(ei.getKey(),
                ei.getType());

        // now merge fragments one at a time into ILF document
        Enumeration fragments = sequence.elements();

        while( fragments.hasMoreElements() )
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

            this.userAttributes.remove(key);
        }
       
        if (!this.entityIdentifierSet && key.equals(IPerson.USERNAME)) {
            final Object userName = value != null && value.size() > 0 ? value.get(0) : null;
            this.m_eid = new EntityIdentifier(String.valueOf(userName), IPerson.class);
        }
    }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

              ResultSet rs = ps.executeQuery();
              try {
                //System.out.println(ps.toString());
                while (rs.next()){
                  //System.out.println("result");
                  ar.add(new EntityIdentifier(rs.getString(1), org.jasig.portal.EntityTypes.GROUP_ENTITY_TYPE));
                }
              } finally {
                close(rs);
              }
            } finally {
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

        }

        //Load the group information about the current user
        final IUserInstance userInstance = this.userInstanceManager.getUserInstance(this.getWrappedRequest());
        final IPerson person = userInstance.getPerson();
        final EntityIdentifier personEntityId = person.getEntityIdentifier();
        final IGroupMember personGroupMember = GroupService.getGroupMember(personEntityId);
       
        return personGroupMember.isDeepMemberOf(groupForRole);
    }
View Full Code Here

Examples of org.jasig.portal.EntityIdentifier

      {
          if (groupKey == null || p == null)
              return false;
         
          IEntityGroup group = getGroup(groupKey);
          EntityIdentifier ei = p.getEntityIdentifier();
         
          try
          {
              IGroupMember groupMember = GroupService.getGroupMember(ei);
              boolean isMember =false;
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.