Examples of BaseSecurityAllow


Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

                    allow.setOwner(true);
                    access.getOwnerAllows().add(allow);
                }
                else if (sa.getAllowType().equals(ALLOW_BOTH))
                {
                    SecurityAllow allow = new BaseSecurityAllow(sa.getId());
                   
                    allow.setRole(sa.getAllowValue());
                    allow.setGroup(sa.getAllowGroup());
                    access.getAllows().add(allow);               
                }
                else if (sa.getAllowType().equals(ALLOW_ROLE))
                {
                    SecurityAllow allow = new BaseSecurityAllow(sa.getId());
                   
                    allow.setRole(sa.getAllowValue());
                    access.getAllows().add(allow);
                }
                else if (sa.getAllowType().equals(ALLOW_GROUP))
                {
                    SecurityAllow allow = new BaseSecurityAllow(sa.getId());
                   
                    allow.setGroup(sa.getAllowValue());
                    access.getAllows().add(allow);
                }
                else
                {
                    SecurityAllow allow = new BaseSecurityAllow(sa.getId());                   
                    allow.setUser(sa.getAllowValue());
                    access.getAllows().add(allow);
                }                   
            }
            se.getAccesses().add(access);
        }
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

        String allowValue = rundata.getParameters().getString("allow_value");

        SecurityAllow allow = null;
        if (allowType.equals("user"))
        {
            allow = new BaseSecurityAllow();
            allow.setUser(allowValue);
            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("role"))
        {
            allow = new BaseSecurityAllow();
            allow.setRole(allowValue);

            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("owner"))
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

        Registry.addEntry(Registry.SECURITY, (RegistryEntry) createSecurityEntry( "all_users-view_anon", "user", "*"));
        assertNotNull( "Getting all_users-view_anon security " , Registry.getEntry( Registry.SECURITY, "all_users-view_anon"));
        SecurityEntry secEntry = (SecurityEntry) Registry.getEntry( Registry.SECURITY, "all_users-view_anon");
        Vector accessVector = secEntry.getAccesses();
        assertEquals( "Getting number of accesses for all_users-view_anon", 1, accessVector.size());
        BaseSecurityAllow allowElement = new BaseSecurityAllow();
        allowElement.setRole("guest");
        Vector allowVector = new Vector();
        allowVector.addElement(allowElement);
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
        accessElement.setAction("view");
        accessElement.setAllows( allowVector );
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

    private SecurityEntry createSecurityEntry( String name, String role, String action)
    {
        Vector allowVector = null;
        if (role != null)
        {
            BaseSecurityAllow allowElement = new BaseSecurityAllow();
            allowElement.setRole(role);
            allowVector = new Vector();
            allowVector.addElement(allowElement);
        }
       
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

        Registry.addEntry(Registry.SECURITY, (RegistryEntry) createSecurityEntry( "all_users-view_anon", "user", "*"));
        assertNotNull( "Getting all_users-view_anon security " , Registry.getEntry( Registry.SECURITY, "all_users-view_anon"));
        SecurityEntry secEntry = (SecurityEntry) Registry.getEntry( Registry.SECURITY, "all_users-view_anon");
        Vector accessVector = secEntry.getAccesses();
        assertEquals( "Getting number of accesses for all_users-view_anon", 1, accessVector.size());
        BaseSecurityAllow allowElement = new BaseSecurityAllow();
        allowElement.setRole("guest");
        Vector allowVector = new Vector();
        allowVector.addElement(allowElement);
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
        accessElement.setAction("view");
        accessElement.setAllows( allowVector );
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

    private SecurityEntry createSecurityEntry( String name, String role, String action)
    {
        Vector allowVector = null;
        if (role != null)
        {
            BaseSecurityAllow allowElement = new BaseSecurityAllow();
            allowElement.setRole(role);
            allowVector = new Vector();
            allowVector.addElement(allowElement);
        }
       
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

        String allowValue = rundata.getParameters().getString("allow_value");

        SecurityAllow allow = null;
        if (allowType.equals("user"))
        {
            allow = new BaseSecurityAllow();
            allow.setUser(allowValue);
            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("role"))
        {
            allow = new BaseSecurityAllow();
            allow.setRole(allowValue);

            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("owner"))
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

        Registry.addEntry(Registry.SECURITY, (RegistryEntry) createSecurityEntry( "all_users-view_anon", null, "user", null, "*"));
        assertNotNull( "Getting all_users-view_anon security " , Registry.getEntry( Registry.SECURITY, "all_users-view_anon"));
        SecurityEntry secEntry = (SecurityEntry) Registry.getEntry( Registry.SECURITY, "all_users-view_anon");
        Vector accessVector = secEntry.getAccesses();
        assertEquals( "Getting number of accesses for all_users-view_anon", 1, accessVector.size());
        BaseSecurityAllow allowElement = new BaseSecurityAllow();
        allowElement.setRole("guest");
        Vector allowVector = new Vector();
        allowVector.addElement(allowElement);
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
        accessElement.setAction("view");
        accessElement.setAllows( allowVector );
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

    private SecurityEntry createSecurityEntry( String name, String group, String role, String user, String action)
    {
        Vector allowVector = null;
        if (role != null || group != null || user != null)
        {
            BaseSecurityAllow allowElement = new BaseSecurityAllow();
            allowElement.setRole(role);
            allowElement.setGroup(group);
            allowElement.setUser(user);
            allowVector = new Vector();
            allowVector.addElement(allowElement);
        }
       
        BaseSecurityAccess accessElement  = new BaseSecurityAccess();
View Full Code Here

Examples of org.apache.jetspeed.om.registry.base.BaseSecurityAllow

    String allowValue2 = rundata.getParameters().getString("allow_value2");

        SecurityAllow allow = null;
        if (allowType.equals("user"))
        {
            allow = new BaseSecurityAllow();
            allow.setUser(allowValue);
            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("role"))
        {
            allow = new BaseSecurityAllow();
            allow.setRole(allowValue);

            securityAccess.getAllows().add(allow);
        }
        else if (allowType.equals("group"))
        {
            allow = new BaseSecurityAllow();
            allow.setGroup(allowValue);

            securityAccess.getAllows().add(allow);
        }
    else if (allowType.equals("groupRole"))
    {
      allow = new BaseSecurityAllow();
      allow.setGroup(allowValue);
      allow.setRole(allowValue2);

      securityAccess.getAllows().add(allow);
    }
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.