Examples of SecurityConstraintImpl


Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

               
                // check against constraints
                Iterator checkConstraintsIter = checkConstraints.iterator();
                while (checkConstraintsIter.hasNext())
                {
                    SecurityConstraintImpl constraint = (SecurityConstraintImpl)checkConstraintsIter.next();
                   
                    // if permissions specified, attempt to match constraint
                    if (constraint.getPermissions() != null)
                    {
                        // explicit actions permitted
                        anyActionsPermitted = true;

                        // test action permission match and user/role/group principal match
                        if (constraint.actionMatch(action) &&
                            constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, true))
                        {
                            actionPermitted = true;
                            break;
                        }
                    }
                    else
                    {
                        // permissions not specified: not permitted if any principal matched
                        if (constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, false))
                        {
                            actionNotPermitted = true;
                            break;
                        }
                    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

               
                // check against constraints
                Iterator checkConstraintsIter = checkConstraints.iterator();
                while (checkConstraintsIter.hasNext())
                {
                    SecurityConstraintImpl constraint = (SecurityConstraintImpl)checkConstraintsIter.next();
                   
                    // if permissions specified, attempt to match constraint
                    if (constraint.getPermissions() != null)
                    {
                        // explicit actions permitted
                        anyActionsPermitted = true;

                        // test action permission match and user/role/group principal match
                        if (constraint.actionMatch(action) &&
                            constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, true))
                        {
                            actionPermitted = true;
                            break;
                        }
                    }
                    else
                    {
                        // permissions not specified: not permitted if any principal matched
                        if (constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, false))
                        {
                            actionNotPermitted = true;
                            break;
                        }
                    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

     * @see org.apache.jetspeed.om.common.SecureResource#newSecurityConstraint()
     * @return security constraint
     */
    public SecurityConstraint newSecurityConstraint()
    {
        return new SecurityConstraintImpl();
    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

            {
                throw new ClassCastException("Unable to create security constraint instance: " + constraints.getSecurityConstraintClass().getName() + ", (" + iae + ").");
            }
        }
        // return universal security constraint instance
        return new SecurityConstraintImpl();
    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

               
                // check against constraints
                Iterator checkConstraintsIter = checkConstraints.iterator();
                while (checkConstraintsIter.hasNext())
                {
                    SecurityConstraintImpl constraint = (SecurityConstraintImpl)checkConstraintsIter.next();
                   
                    // if permissions specified, attempt to match constraint
                    if (constraint.getPermissions() != null)
                    {
                        // explicit actions permitted
                        anyActionsPermitted = true;

                        // test action permission match and user/role/group principal match
                        if (constraint.actionMatch(action) &&
                            constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, true))
                        {
                            actionPermitted = true;
                            break;
                        }
                    }
                    else
                    {
                        // permissions not specified: not permitted if any principal matched
                        if (constraint.principalsMatch(userPrincipals, rolePrincipals, groupPrincipals, false))
                        {
                            actionNotPermitted = true;
                            break;
                        }
                    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

            {
                throw new ClassCastException("Unable to create security constraint instance: " + constraints.getSecurityConstraintClass().getName() + ", (" + iae + ").");
            }
        }
        // return universal security constraint instance
        return new SecurityConstraintImpl();
    }
View Full Code Here

Examples of org.apache.jetspeed.om.page.SecurityConstraintImpl

     * @see org.apache.jetspeed.om.common.SecureResource#newSecurityConstraint()
     * @return security constraint
     */
    public SecurityConstraint newSecurityConstraint()
    {
        return new SecurityConstraintImpl();
    }
View Full Code Here

Examples of org.glassfish.web.deployment.descriptor.SecurityConstraintImpl

      int noSc = 0;
      // get the errorpage's in this .war
      for (Enumeration e = descriptor.getSecurityConstraints() ; e.hasMoreElements() ;) {
    foundIt = false;
                noSc++;
    SecurityConstraintImpl securityConstraintImpl = (SecurityConstraintImpl) e.nextElement();
    UserDataConstraintImpl userDataConstraint = (UserDataConstraintImpl) securityConstraintImpl.getUserDataConstraint();
    if (userDataConstraint != null) {
                    String transportGuarantee = userDataConstraint.getTransportGuarantee();
        if (transportGuarantee.length() > 0) {
            if ((transportGuarantee.equals("NONE")) ||
          (transportGuarantee.equals("INTEGRAL")) ||
View Full Code Here

Examples of org.glassfish.web.deployment.descriptor.SecurityConstraintImpl

            // get the security constraint's in this .war
            for (Enumeration e = descriptor.getSecurityConstraints(); e.hasMoreElements();)
            {
                foundIt = false;
                noSc++;
                SecurityConstraintImpl securityConstraintImpl = (SecurityConstraintImpl) e.nextElement();
                if (!securityConstraintImpl.getWebResourceCollections().isEmpty())
                {
                    for (WebResourceCollection webResCollection: securityConstraintImpl.getWebResourceCollections())
                    {
                        String webRCName = webResCollection.getName();
                        // cannot be blank
                        if (webRCName.length() > 0)
                        {
View Full Code Here

Examples of org.glassfish.web.deployment.descriptor.SecurityConstraintImpl

            int noSc = 0;
      // get the security role name's in this .war
      for (Enumeration e = descriptor.getSecurityConstraints() ; e.hasMoreElements() ;) {
    foundIt = false;
                noSc++;
    SecurityConstraintImpl securityConstraintImpl = (SecurityConstraintImpl)
        e.nextElement();
    AuthorizationConstraintImpl aci = (AuthorizationConstraintImpl) securityConstraintImpl.getAuthorizationConstraint();
    if (aci != null) {
                    noAci++;
                    if (aci.getSecurityRoles().hasMoreElements()) {
      for (Enumeration ee = aci.getSecurityRoles(); ee.hasMoreElements();) {
          SecurityRoleDescriptor srd = (SecurityRoleDescriptor) ee.nextElement();
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.