Package org.apache.wiki.auth.permissions

Examples of org.apache.wiki.auth.permissions.AllPermission


        // Attach the PageManager as a listener
        // TODO: it would be better if we did this in PageManager directly
        addWikiEventListener( engine.getPageManager() );

        JSONRPCManager.registerGlobalObject( "users", new JSONUserModule(this), new AllPermission(null) );
    }
View Full Code Here


            {
                return DUMMY_PERMISSION;
            }
            if ( adminExists )
            {
                return new AllPermission( m_engine.getApplicationName() );
            }
        }

        // TODO: we should really break the contract so that this
        // method returns null, but until then we will use this hack
View Full Code Here

    public boolean hasAdminPermissions()
    {
        boolean admin = false;

        admin = m_engine.getAuthorizationManager().checkPermission( getWikiSession(),
                                                                    new AllPermission(m_engine.getApplicationName()) );

        return admin;
    }
View Full Code Here

                m_engine,
                Users.ALICE,
                new Principal[] { admin } );

        assertTrue( "Alice has AllPermission", m_auth.checkPermission( session,
                                                                       new AllPermission( m_engine.getApplicationName() )));
        assertTrue( "Alice cannot read", m_auth.checkPermission( session,
                                                                 new PagePermission("TestDefaultPage","view") ) );
    }
View Full Code Here

        m_engine.saveText( "TestDefaultPage", "Foo [{ALLOW view FooBar}]" );
    
        WikiSession session = WikiSessionTest.adminSession(m_engine);

        assertTrue( "Alice has AllPermission", m_auth.checkPermission( session,
                                                                       new AllPermission( m_engine.getApplicationName() )));
        assertTrue( "Alice cannot read", m_auth.checkPermission( session,
                                                                 new PagePermission("TestDefaultPage","view") ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.wiki.auth.permissions.AllPermission

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.