Examples of loginAsAdmin()


Examples of org.glassfish.internal.api.AdminAccessController.loginAsAdmin()

            // This is temporary workaround for a Grizzly issue that prohibits uploading (deploy)  files larger than 2MB when secure admin is enabled.
            // The workaround will not be required in trunk when the corresponding Grizzly issue is fixed.
            // Please see http://java.net/jira/browse/GLASSFISH-16665 for details
            // The workaround duplicates code from AdminAdapter.

            subject = authenticator.loginAsAdmin(req, remoteHost);
        }
        return subject;
    }

    /**
 
View Full Code Here

Examples of org.glassfish.internal.api.AdminAccessController.loginAsAdmin()

            // This is temporary workaround for a Grizzly issue that prohibits uploading (deploy)  files larger than 2MB when secure admin is enabled.
            // The workaround will not be required in trunk when the corresponding Grizzly issue is fixed.
            // Please see http://java.net/jira/browse/GLASSFISH-16665 for details
            // The workaround duplicates code from AdminAdapter.

            subject = authenticator.loginAsAdmin(req, remoteHost);
        }
        return subject;
    }

    /**
 
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

    @Test
    public void testLoginLogoutAsAdmin()
    {
        LoginPage loginPage = this.vp.login();
        loginPage.loginAsAdmin();

        // Verify that after logging in we're redirected to the page on which the login button was clicked, i.e. the
        // non existent page here.
        Assert.assertEquals(this.nonExistentPageURL, getDriver().getCurrentUrl());
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

            page.logout();
            // Since view is disallowed for unauthenticated users, at this point we see a log in page.
            LoginPage loginPage = new LoginPage();
            // Remove all cookie to simulate a session expiry
            getDriver().manage().deleteAllCookies();
            loginPage.loginAsAdmin();

            // We use startsWith since the URL contains a jsessionid and a srid.
            Assert.assertTrue(getDriver().getCurrentUrl().startsWith(getUtil().getURL("SomeSpace", "SomePage")));
        } finally {
            GlobalRightsAdministrationSectionPage grasp = new GlobalRightsAdministrationSectionPage();
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

    {
        String test = "Test string " + System.currentTimeMillis();
        final String space = "Main";
        final String page = "POSTTest";
        LoginPage loginPage = this.vp.login();
        loginPage.loginAsAdmin();
        // start editing a page
        WikiEditPage editPage = new WikiEditPage();
        editPage.switchToEdit(space, page);
        editPage.setTitle(test);
        editPage.setContent(test);
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

        if (wantUrl.indexOf('?') > 0) {
            // strip parameters
            wantUrl = wantUrl.substring(0, wantUrl.indexOf('?'));
        }
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(wantUrl));
        loginPage.loginAsAdmin();
        // we should have been redirected back to view, and the page should have been saved
        Assert.assertTrue(getDriver().getCurrentUrl().startsWith(getUtil().getURL(space, page)));
        editPage.switchToEdit(space, page);
        Assert.assertEquals(test, editPage.getTitle());
        Assert.assertEquals(test, editPage.getContent());
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

        // We will choose the Scheduler.WebHome page to make our testing
        // since it can't be viewed without being logged in
        getUtil().gotoPage("Scheduler", "WebHome");
        LoginPage loginPage = new LoginPage();
        Assert.assertFalse(loginPage.isAuthenticated());
        loginPage.loginAsAdmin();
        // We should be redirected back to Scheduler.WebHome
        Assert.assertTrue(getDriver().getCurrentUrl().contains("/xwiki/bin/view/Scheduler/WebHome"));
        Assert.assertTrue(getDriver().getTitle().contains("Job Scheduler"));
    }
View Full Code Here

Examples of org.xwiki.test.ui.framework.elements.LoginPage.loginAsAdmin()

    public void testDataIsPreservedAfterLogin()
    {
        getUtil().gotoPage("Test", "TestData", "save", "content=this+should+not+be+saved");
        getUtil().gotoPage("Test", "TestData", "save", "content=this+should+be+saved+instead&parent=Main.WebHome");
        LoginPage loginPage = new LoginPage();
        loginPage.loginAsAdmin();
        // we switched to another user, CSRF protection (if enabled) will ask for confirmation
        ResubmissionPage resubmissionPage = new ResubmissionPage();
        if (resubmissionPage.isOnResubmissionPage()) {
            resubmissionPage.resubmit();
        }
View Full Code Here

Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

        // We will choose the Scheduler.WebHome page to make our testing
        // since it can't be viewed without being logged in
        getUtil().gotoPage("Scheduler", "WebHome");
        LoginPage loginPage = new LoginPage();
        Assert.assertFalse(loginPage.isAuthenticated());
        loginPage.loginAsAdmin();
        // We should be redirected back to Scheduler.WebHome
        Assert.assertTrue(getDriver().getCurrentUrl().contains("/xwiki/bin/view/Scheduler/WebHome"));
        Assert.assertTrue(getDriver().getTitle().contains("Job Scheduler"));
    }
View Full Code Here

Examples of org.xwiki.test.ui.po.LoginPage.loginAsAdmin()

    public void testDataIsPreservedAfterLogin()
    {
        getUtil().gotoPage("Test", "TestData", "save", "content=this+should+not+be+saved");
        getUtil().gotoPage("Test", "TestData", "save", "content=this+should+be+saved+instead&parent=Main.WebHome");
        LoginPage loginPage = new LoginPage();
        loginPage.loginAsAdmin();
        // we switched to another user, CSRF protection (if enabled) will ask for confirmation
        ResubmissionPage resubmissionPage = new ResubmissionPage();
        if (resubmissionPage.isOnResubmissionPage()) {
            resubmissionPage.resubmit();
        }
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.