Examples of PagePermission

@author David Sean Taylor
  • org.apache.wiki.auth.permissions.PagePermission

    Permission to perform an operation on a single page or collection of pages in a given wiki. Permission actions include: viewedit (edit the text of a wiki page), commentuploadmodify (edit text and upload attachments), delete  and rename.

    The target of a permission is a single page or collection in a given wiki. The syntax for the target is the wiki name, followed by a colon (:) and the name of the page. "All wikis" can be specified using a wildcard (*). Page collections may also be specified using a wildcard. For pages, the wildcard may be a prefix, suffix, or all by itself. Examples of targets include:

    *:*
    *:JanneJalkanen
    *:Jalkanen
    *:Janne*
    mywiki:JanneJalkanen
    mywiki:*Jalkanen
    mywiki:Janne*

    For a given target, certain permissions imply others:

    @since 2.3

  • Examples of org.apache.wiki.auth.permissions.PagePermission

                    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

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

            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
    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.