Examples of canSubscribe()


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

            // determine if user has permission for rendering
            Link link = (Link)iter.next();
           
            try
            {
                if ( ap.canSubscribe(link.publishIdOfTargetChannel) )
                {
                    if (LOG.isDebugEnabled())
                        LOG.debug("User can render channel '"
                                + link.publishIdOfTargetChannel
                                + "' with url '" + link.url + "'");
View Full Code Here

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

     
        List<IChannelDefinition> defs = channelDao.getChannelDefinitions();
        List<IChannelDefinition> manageableChannels = new ArrayList<IChannelDefinition>();
       
      for(IChannelDefinition def : defs) {
        if(ap.canSubscribe(def.getId())) {
          manageableChannels.add(def);
        }
      }
     
      return manageableChannels;
View Full Code Here

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

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

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

      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.canSubscribe(Integer.parseInt(channelPublishId)))
        channel.getParentNode().removeChild(channel);
    }

    return channelRegistry;
  }
View Full Code Here

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

      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.canSubscribe(Integer.parseInt(channelPublishId)))
        channel.getParentNode().removeChild(channel);
    }

    return channelRegistry;
  }
View Full Code Here

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

            return false;
        }

        // check that the user has subscribe priv.
        IAuthorizationPrincipal authPrincipal = authorizationService.newPrincipal(person.getUserName(), EntityEnum.PERSON.getClazz());
        if (!authPrincipal.canSubscribe(portletId)) {
            return false;
        }

        return true;
    }
View Full Code Here

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

   
    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);
        categoryBean.addChannel(channel);
      }
View Full Code Here

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

            final String fname = portlet.getFname();
            PortletUsage portletUsage = resultBuilder.get(fname);
            if (portletUsage == null) {
                final IPortletDefinition portletDefinition = this.portletDefinitionDao.getPortletDefinitionByFname(fname);
               
                if (portletDefinition == null || !ap.canSubscribe(portletDefinition.getPortletDefinitionId().getStringId())) {
                    //Skip portlets that no longer exist or cannot be subscribed to
                    continue;
                }
               
                portletUsage = new PortletUsage(
View Full Code Here

Examples of org.jivesoftware.openfire.pubsub.models.AccessModel.canSubscribe()

        }
        // TODO Assumed that the owner of the subscription is the bare JID of the subscription JID. Waiting StPeter answer for explicit field.
        JID owner = new JID(subscriberJID.toBareJID());
        // Check if the node's access model allows the subscription to proceed
        AccessModel accessModel = node.getAccessModel();
        if (!accessModel.canSubscribe(node, owner, subscriberJID)) {
            sendErrorPacket(iq, accessModel.getSubsriptionError(),
                    accessModel.getSubsriptionErrorDetail());
            return;
        }
        // Check if the subscriber is an anonymous user
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.