Package org.infoglue.cms.security

Examples of org.infoglue.cms.security.InfoGluePrincipal


                String s = (String) iter.next();
                HttpSession sess = (HttpSession) sessions.get(s);

                try
                {
                  InfoGluePrincipal principal = (InfoGluePrincipal)sess.getAttribute(InfoGlueAuthenticationFilter.INFOGLUE_FILTER_USER);
                  if(principal == null)
                    principal = (InfoGluePrincipal)sess.getAttribute("infogluePrincipal");

                  if (userName.equals(principal.getName()))
                  {
                    logger.debug("Found user to invalidate");
                    sess.invalidate();
                  }
                }
View Full Code Here


            logger.info("passesCondition.............");
            logger.info("caller:" + context.getCaller());
            logger.info("roleName:" + roleName);
            logger.info("userName:" + userName);
           
            InfoGluePrincipal principal = UserControllerProxy.getController().getUser(context.getCaller());
           
            if(userName != null && userName.length() > 0 && !principal.getName().equals(userName))
                passesCondition = false;
           
            if(roleName != null && roleName.length() > 0)
            {
                boolean hasRole = false;
              List roles = principal.getRoles();
              Iterator rolesIterator = roles.iterator();
              while(rolesIterator.hasNext())
              {
                  InfoGlueRole role = (InfoGlueRole)rolesIterator.next();
                  if(role.getName().equalsIgnoreCase(roleName))
View Full Code Here

                }
              }

              if(!skipDisplayName)
              {
                InfoGluePrincipal principal = (InfoGluePrincipal)getInfoGluePrincipal(contentVersionVO.getVersionModifier(), db);
                if(principal != null)
                {
                  if(principal.getName().equalsIgnoreCase(principal.getDisplayName()))
                    skipDisplayName = true;
                 
                  contentVersionVO.setVersionModifierDisplayName(principal.getDisplayName());
                }
              }
              contentVersionVO.setPath(getContentPath(contentVersionVO.getContentId(), db));
              contentVersionVO.setLanguageName(LanguageController.getController().getLanguageVOWithId(contentVersionVO.getLanguageId()).getName());
            }
            else
              logger.info("Not adding contentVersion..");
          }
         
          for(SiteNodeVersionVO snVO : siteNodeVersionVOList)
          {
            if(snVO.getStateId() == 0)
            {
              Integer protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(snVO.getId(), db);
              if(protectedSiteNodeVersionId != null)
              {
                boolean hasAnonymousUserAccess = AccessRightController.getController().getIsPrincipalAuthorized(db, UserControllerProxy.getController().getUser(CmsPropertyHandler.getAnonymousUser()), "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString(), false);
                if(!hasAnonymousUserAccess)
                {
                  anonymousNoAccessWarning = true;
                  snVO.setHasAnonymousUserAccess(false);
                }
              }
             
              if(!skipDisplayName)
              {
                InfoGluePrincipal principal = (InfoGluePrincipal)getInfoGluePrincipal(snVO.getVersionModifier(), db);
                if(principal != null)
                {
                  if(principal.getName().equalsIgnoreCase(principal.getDisplayName()))
                    skipDisplayName = true;
                 
                  snVO.setVersionModifierDisplayName(principal.getDisplayName());
                }
              }
              snVO.setPath(getSiteNodePath(snVO.getSiteNodeId(), db));
            }
            else
View Full Code Here

                 
                  Iterator userIterator = users.iterator();
               
              while(userIterator.hasNext())
                {
                    InfoGluePrincipal principal = (InfoGluePrincipal)userIterator.next();
                    if(principal.getName().equalsIgnoreCase(accessRightUserVO.getUserName()))
                    {
                      isValid = true;
                      break;
                    }
                }
View Full Code Here

   */
  protected void populate() throws WorkflowException
  {
    for(final Iterator principals = getPrincipals().iterator(); principals.hasNext(); )
    {
      final InfoGluePrincipal principal = (InfoGluePrincipal) principals.next();
      logger.debug("Creating email for user [" + principal.getName() + "].");
      addRecipient(principal.getEmail());
    }
  }
View Full Code Here

  {
    List usersFirstNameChars = new ArrayList();
    Iterator principalIterator = this.infogluePrincipals.iterator();
    while(principalIterator.hasNext())
    {
      InfoGluePrincipal infogluePrincipal = (InfoGluePrincipal)principalIterator.next();
      if(!usersFirstNameChars.contains(infogluePrincipal.getName().charAt(0)))
        usersFirstNameChars.add(infogluePrincipal.getName().charAt(0));
      //else
      //  logger.info("Exists:" + infogluePrincipal.getName().charAt(0));
    }
   
    Collections.sort(usersFirstNameChars);
View Full Code Here

     
    Iterator infogluePrincipalsIterator = this.infogluePrincipals.iterator();
    boolean foundSection = false;
    while(infogluePrincipalsIterator.hasNext())
    {
      InfoGluePrincipal infogluePrincipal = (InfoGluePrincipal)infogluePrincipalsIterator.next();
      if(infogluePrincipal.getName().charAt(0) == filterChar)
      {
        subList.add(infogluePrincipal);
        foundSection = true;
      }
      else if(foundSection)
View Full Code Here

   
    List contentTypeDefinitionVOList = UserPropertiesController.getController().getContentTypeDefinitionVOList(userName);
    if(contentTypeDefinitionVOList != null && contentTypeDefinitionVOList.size() > 0)
      this.setContentTypeDefinitionVO((ContentTypeDefinitionVO)contentTypeDefinitionVOList.get(0));
   
    InfoGluePrincipal infoGluePrincipal = UserControllerProxy.getController().getUser(userName);
    userPropertiesVOList = UserPropertiesController.getController().getUserPropertiesVOList(userName, this.getLanguageId());
    if(userPropertiesVOList != null && userPropertiesVOList.size() > 0)
    {
      this.userPropertiesVO = (UserPropertiesVO)userPropertiesVOList.get(0);
      this.setContentTypeDefinitionId(this.userPropertiesVO.getContentTypeDefinitionId());
View Full Code Here

    if(primaryKey == null || primaryKey.equals(""))
      throw new Exception("Missing argument userName for primaryKey.");
   
    List<ToolbarButton> buttons = new ArrayList<ToolbarButton>();

    InfoGluePrincipal infoGluePrincipal = UserControllerProxy.getController().getUser(primaryKey);
    if(infoGluePrincipal == null)
      throw new SystemException("No user found called '" + primaryKey + "'. This could be an encoding issue if you gave your user a login name with non ascii chars in it. Look in the administrative manual on how to solve it.");
    boolean supportsUpdate = infoGluePrincipal.getAutorizationModule().getSupportUpdate();
   
    if(supportsUpdate)
    {
      buttons.add(getCommonFooterSaveButton(toolbarKey, principal, locale, request, disableCloseButton));
      buttons.add(getCommonFooterSaveAndExitButton(toolbarKey, principal, locale, request, disableCloseButton, "UpdateSystemUser!saveAndExitV3.action"));
View Full Code Here

      }
    }

    if(!userName.equals(CmsPropertyHandler.getAnonymousUser()))
    {
      InfoGluePrincipal user = UserControllerProxy.getController().getUser(userName);
      if(user.getAutorizationModule().getSupportDelete())
      {
        buttons.add(new ToolbarButton("",
            getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
            getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
            "DeleteSystemUser.action?userName=" + formatter.encodeBase64(userName) + "&igSecurityCode=" + request.getSession().getAttribute("securityCode"),
            "css/images/v3/createBackgroundPenPaper.gif",
            "left",
            "delete",
            false,
            true,
            getLocalizedString(locale, "tool.managementtool.deleteSystemUser.header"),
            getLocalizedString(locale, "tool.managementtool.deleteSystemUser.text", new String[]{userName}),
              "workIframe"));
      }
     
      if(user.getAutorizationModule().getSupportUpdate())
      {
        buttons.add(new ToolbarButton("",
              getLocalizedString(locale, "tool.managementtool.viewSystemUserPasswordDialog.header"),
              getLocalizedString(locale, "tool.managementtool.viewSystemUserPasswordDialog.header"),
              "UpdateSystemUserPassword!input.action?userName=" + formatter.encodeBase64(userName) + "&igSecurityCode=" + request.getSession().getAttribute("securityCode"),
View Full Code Here

TOP

Related Classes of org.infoglue.cms.security.InfoGluePrincipal

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.