Examples of AllPermission


Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

                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

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

        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

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

        // Lastly, check for AllPermission
        s.append( "  <tr>\n" );
        s.append( "    <td>AllPermission \"" + wiki + "\"</td>\n" );
        for( Principal role : roles )
        {
            Permission permission = new AllPermission( wiki );
            s.append( printPermissionTest( permission, role, pageActions.length ) );
        }
        s.append( "  </tr>\n" );

        // We're done!
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

                gotPermission = mgr.checkPermission( session, new GroupPermission( groupName, action ) );
            }
        }
        else if ( ALL_PERMISSION.equals( permission ) )
        {
            gotPermission = mgr.checkPermission( session, new AllPermission( m_wikiContext.getEngine().getApplicationName() ) );
        }
        else if ( page != null )
        {
            //
            //  Edit tag also checks that we're not trying to edit an
View Full Code Here

Examples of com.ecyrd.jspwiki.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

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

        }

        Principal user = session.getLoginPrincipal();

        // Always allow the action if user has AllPermission
        Permission allPermission = new AllPermission( m_engine.getApplicationName() );
        boolean hasAllPermission = checkStaticPermission( session, allPermission );
        if ( hasAllPermission )
        {
            fireEvent( WikiSecurityEvent.ACCESS_ALLOWED, user, permission );
            return true;
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

            {
                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

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

    public boolean hasAdminPermissions()
    {
        boolean admin = false;

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

        return admin;
    }
View Full Code Here

Examples of com.ecyrd.jspwiki.auth.permissions.AllPermission

                         String target )
    {
        super( requestContext, urlPattern, contentTemplate, target );
        m_action = null;

        m_permission = new AllPermission( target );
    }
View Full Code Here

Examples of java.security.AllPermission

        if (sm != null)
        {
            ((SecurityManager) sm).checkPermission(
                new AdminPermission(bundle, AdminPermission.EXTENSIONLIFECYCLE));

            if (!((BundleProtectionDomain) bundle.getProtectionDomain()).impliesDirect(new AllPermission()))
            {
                throw new SecurityException("Extension Bundles must have AllPermission");
            }
        }
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.