Examples of canManage()


Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

        Iterator<IGroupMember> iter = parentGroup.getMembers();
        while (iter.hasNext()) {
            IGroupMember gm = (IGroupMember)iter.next();
            if (gm.isEntity()) {
                int channelPublishId = Integer.parseInt(gm.getKey());
              if(ap.canManage(channelPublishId)) {
                channelDefs.add(getChannelDefinition(channelPublishId));
              }
            }
        }
        return (IChannelDefinition[])channelDefs.toArray(new IChannelDefinition[channelDefs.size()]);
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

      Element channel = (Element)nl.item(i);
      String channelPublishId = channel.getAttribute("chanID");
      channelPublishId = channelPublishId.startsWith("chan") ? channelPublishId.substring(4) : channelPublishId;

      // Take out channels which user doesn't have access to
      if (!ap.canManage(Integer.parseInt(channelPublishId)))
        channel.getParentNode().removeChild(channel);
    }

    return channelRegistry;
  }
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

            logger.debug("Found permission for category ALL_CHANNELS and lifecycle state " + state.toString());
            return true;
        }
     
    for (JsonEntityBean category : categories) {
      if (ap.canManage(state, category.getId())) {
        logger.debug("Found permission for category " + category.getName() + " and lifecycle state " + state.toString());
        return true;
      }
    }
    logger.debug("No permission for lifecycle state " + state.toString());
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

    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.security.IAuthorizationPrincipal.canManage()

            logger.debug("Found permission for category ALL_PORTLETS and lifecycle state " + state.toString());
            return true;
        }
     
    for (JsonEntityBean category : categories) {
      if (ap.canManage(state, category.getId())) {
        logger.debug("Found permission for category " + category.getName() + " and lifecycle state " + state.toString());
        return true;
      }
    }
    logger.debug("No permission for lifecycle state " + state.toString());
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

    EntityIdentifier ei = user.getEntityIdentifier();
      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());

      if (type.equals(TYPE_MANAGE)) {
          for (IPortletDefinition channel : allChannels) {
              if (ap.canManage(channel.getPortletDefinitionId().getStringId())) {
                  channels.add(getChannel(channel, request, locale));
              }
          }
      }
   
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

      IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
    boolean isManage = type.equals(TYPE_MANAGE);
   
    for(IPortletDefinition channelDef : portlets) {
     
      if ((isManage && ap.canManage(channelDef.getPortletDefinitionId()
          .getStringId()))
          || (!isManage && ap.canSubscribe(channelDef
              .getPortletDefinitionId().getStringId()))) {
        // construct a new channel bean from this channel
        ChannelBean channel = getChannel(channelDef, request, locale);
View Full Code Here

Examples of org.jasig.portal.security.IAuthorizationPrincipal.canManage()

        EntityIdentifier ei = user.getEntityIdentifier();
        IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());

        List<PortletTuple> rslt = new ArrayList<PortletTuple>();
        for (IPortletDefinition pdef : allPortlets) {
            if (ap.canManage(pdef.getPortletDefinitionId().getStringId())) {
                rslt.add(new PortletTuple(pdef));
            }
        }

        return new ModelAndView("json", "portlets", rslt);
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.