Package org.jasig.portal.security

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


        catch (Exception e) {
            this.logger.warn("Could not find ChannelDefinition for fname='" + channelFName + "' while checking if user '" + userName + "' can render it. Returning FALSE.", e);
            return false;
        }
       
        return userPrincipal.canRender(channelId);
    }
   
    protected IAuthorizationPrincipal getUserPrincipal(final String userName) {
        final IEntity user = GroupService.getEntity(userName, IPerson.class);
        if (user == null) {
View Full Code Here


                    NodeList channels = fd.getElementsByTagName("channel");
                    for (int j=0; j < channels.getLength(); j++) {
                      Element ch = (Element) channels.item(j);
                      try {
                        int chanId = Integer.parseInt(ch.getAttribute("chanID"));
                        if (!principal.canRender(chanId)) {
                          fd.removeChild(ch);
                          if (LOG.isDebugEnabled()) {
                            LOG.debug("RDBMUserLayoutStore removing channel '"
                                  + ch.getAttribute("fname")
                                  + "' from the header or footer of user '"
View Full Code Here

             
              //If the event is global there might still be portlet definitions that need targeting
              for (final IPortletDefinition portletDefinition : portletDefinitions) {
                final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
                //Check if the user can render the portlet definition before doing event tests
                if (ap.canRender(portletDefinitionId.getStringId())) {
                  if (this.supportsEvent(event, portletDefinitionId)) {
                    this.logger.debug("{} supports event {}", portletDefinition, event);
                     
                      final IPortletEntity portletEntity = this.portletEntityRegistry.getOrCreateDefaultPortletEntity(request, portletDefinitionId);
                        final IPortletEntityId portletEntityId = portletEntity.getPortletEntityId();
View Full Code Here

      }
       
        final IPerson person = userInstance.getPerson();
    final EntityIdentifier ei = person.getEntityIdentifier();
      final IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(ei.getKey(), ei.getType());
      if (ap.canRender(portletDefinition.getPortletDefinitionId().getStringId())) {
        return portletDefinition;
      }
     
      return null;
  }
View Full Code Here

                NodeList channels = fd.getElementsByTagName("channel");
                for (int j=0; j < channels.getLength(); j++) {
                  Element ch = (Element) channels.item(j);
                  try {
                    String chanId = ch.getAttribute("chanID");
                    if (!principal.canRender(chanId)) {
                      fd.removeChild(ch);
                      if (LOG.isDebugEnabled()) {
                        LOG.debug("RDBMUserLayoutStore removing channel '"
                              + ch.getAttribute("fname")
                              + "' from the header or footer of user '"
View Full Code Here

        catch (Exception e) {
            this.logger.warn("Could not find PortletDefinition for fname='" + fname + "' while checking if user '" + userName + "' can render it. Returning FALSE.", e);
            return false;
        }
       
        return userPrincipal.canRender(portletId);
    }

    @Override
    public boolean hasPermission(final String owner, final String activity, final String target) {
       
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.