Examples of ACLImpl


Examples of com.ecyrd.jspwiki.auth.acl.AclImpl

        props.load( TestEngine.findTestProperties() );
        TestEngine engine  = new TestEngine( props );
        m_groupMgr = engine.getGroupManager();
        m_session = WikiSessionTest.adminSession( engine );

        m_acl = new AclImpl();
        m_aclGroup = new AclImpl();
        m_groups = new HashMap<String, Group>();
        Principal uAlice = new WikiPrincipal( "Alice" );
        Principal uBob = new WikiPrincipal( "Bob" );
        Principal uCharlie = new WikiPrincipal( "Charlie" );
        Principal uDave = new WikiPrincipal( "Dave" );
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.acl.AclImpl

       
        byte[] stuff = out.toByteArray();
       
        ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(stuff) );
       
        AclImpl newacl = (AclImpl) in.readObject();
       
        assert( newacl.equals(m_acl) );
    }
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.acl.AclImpl

                                entry.getValue() );
        }

        if( m_accessList != null )
        {
            p.m_accessList = new AclImpl();
           
            for( Enumeration entries = m_accessList.entries(); entries.hasMoreElements(); )
            {
                AclEntry e = (AclEntry)entries.nextElement();
           
View Full Code Here

Examples of org.acegisecurity.acls.domain.AclImpl

        // Retrieve this Acl from the InputMap
        Acl uncastAcl = (Acl) inputMap.get(currentIdentity);
        Assert.isInstanceOf(AclImpl.class, uncastAcl, "The inputMap contained a non-AclImpl");

        AclImpl inputAcl = (AclImpl) uncastAcl;

        Acl parent = inputAcl.getParentAcl();

        if ((parent != null) && parent instanceof StubAclParent) {
            // Lookup the parent
            StubAclParent stubAclParent = (StubAclParent) parent;
            parent = convert(inputMap, stubAclParent.getId());
        }

        // Now we have the parent (if there is one), create the true AclImpl
        AclImpl result = new AclImpl(inputAcl.getObjectIdentity(), (Long) inputAcl.getId(), aclAuthorizationStrategy,
                auditLogger, parent, null, inputAcl.isEntriesInheriting(), inputAcl.getOwner());

        // Copy the "aces" from the input to the destination
        Field field = FieldUtils.getField(AclImpl.class, "aces");
View Full Code Here

Examples of org.acegisecurity.acls.domain.AclImpl

    private void convertCurrentResultIntoObject(Map acls, ResultSet rs)
        throws SQLException {
        Long id = new Long(rs.getLong("ACL_ID"));

        // If we already have an ACL for this ID, just create the ACE
        AclImpl acl = (AclImpl) acls.get(id);

        if (acl == null) {
            // Make an AclImpl and pop it into the Map
            ObjectIdentity objectIdentity = new ObjectIdentityImpl(rs.getString("CLASS"),
                    new Long(rs.getLong("OBJECT_ID_IDENTITY")));

            Acl parentAcl = null;
            long parentAclId = rs.getLong("PARENT_OBJECT");

            if (parentAclId != 0) {
                parentAcl = new StubAclParent(new Long(parentAclId));
            }

            boolean entriesInheriting = rs.getBoolean("ENTRIES_INHERITING");
            Sid owner;

            if (rs.getBoolean("ACL_PRINCIPAL")) {
                owner = new PrincipalSid(rs.getString("ACL_SID"));
            } else {
                owner = new GrantedAuthoritySid(rs.getString("ACL_SID"));
            }

            acl = new AclImpl(objectIdentity, id, aclAuthorizationStrategy, auditLogger, parentAcl, null,
                    entriesInheriting, owner);
            acls.put(id, acl);
        }

        // Add an extra ACE to the ACL (ORDER BY maintains the ACE list order)
View Full Code Here

Examples of org.acegisecurity.acls.domain.AclImpl

        SecurityContextHolder.clearContext();
    }

    private void changeOwner(int contactNumber, String newOwnerUsername) {
        AclImpl acl = (AclImpl) mutableAclService.readAclById(new ObjectIdentityImpl(Contact.class,
                    new Long(contactNumber)));
        acl.setOwner(new PrincipalSid(newOwnerUsername));
        updateAclInTransaction(acl);
    }
View Full Code Here

Examples of org.acegisecurity.acls.domain.AclImpl

    public int getCreateEntities() {
        return createEntities;
    }

    private void grantPermissions(int contactNumber, String recipientUsername, Permission permission) {
        AclImpl acl = (AclImpl) mutableAclService.readAclById(new ObjectIdentityImpl(Contact.class,
                    new Long(contactNumber)));
        acl.insertAce(null, permission, new PrincipalSid(recipientUsername), true);
        updateAclInTransaction(acl);
    }
View Full Code Here

Examples of org.apache.wiki.auth.acl.AclImpl

        Properties props = TestEngine.getTestProperties();
        TestEngine engine  = new TestEngine( props );
        m_groupMgr = engine.getGroupManager();
        m_session = WikiSessionTest.adminSession( engine );

        m_acl = new AclImpl();
        m_aclGroup = new AclImpl();
        m_groups = new HashMap<String, Group>();
        Principal uAlice = new WikiPrincipal( "Alice" );
        Principal uBob = new WikiPrincipal( "Bob" );
        Principal uCharlie = new WikiPrincipal( "Charlie" );
        Principal uDave = new WikiPrincipal( "Dave" );
View Full Code Here

Examples of org.apache.wiki.auth.acl.AclImpl

       
        byte[] stuff = out.toByteArray();
       
        ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(stuff) );
       
        AclImpl newacl = (AclImpl) in.readObject();
        assert( newacl.toString().equals(m_acl.toString()) );
    }
View Full Code Here

Examples of org.apache.wiki.auth.acl.AclImpl

                                entry.getValue() );
        }

        if( m_accessList != null )
        {
            p.m_accessList = new AclImpl();
           
            for( Enumeration< AclEntry > entries = m_accessList.entries(); entries.hasMoreElements(); )
            {
                AclEntry e = entries.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.