Integration test in 5.3.12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: ../../git/magnolia-5.3-repo/main/magnolia-core/src/main/java/info/magnolia/context/SimpleContext.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/main/magnolia-core/src/main/java/info/magnolia/context/SimpleContext.java (revision 7f9c7c5a1ab1ef502929ea8a4bfd25205822f8a3) | |
| +++ ../../git/magnolia-5.3-repo/main/magnolia-core/src/main/java/info/magnolia/context/SimpleContext.java (revision ) | |
| @@ -56,6 +56,7 @@ | |
| * The context used to get hierarchy managers or similar. | |
| */ | |
| private Context ctx; | |
| + private User user; | |
| /** | |
| * Uses current instance of <code>MgnlContext</code> at the time of creation as it's internal reference context. | |
| @@ -76,6 +77,11 @@ | |
| } | |
| } | |
| + public SimpleContext(Map<String, Object> map, User user) { | |
| + this(map); | |
| + this.user = user; | |
| + } | |
| + | |
| /** | |
| * Delegate to the inner context. | |
| */ | |
| @@ -102,8 +108,14 @@ | |
| */ | |
| @Override | |
| public User getUser() { | |
| + if (this.user == null) { | |
| - return this.ctx.getUser(); | |
| + return this.ctx.getUser(); | |
| + } else { | |
| + return this.user; | |
| - } | |
| + } | |
| + | |
| + } | |
| + | |
| /** | |
| * Delegate to the inner context. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actionbar.sections.pageActions.groups.activationActions.items.testActivateRecursive.xml | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actionbar.sections.pageActions.groups.activationActions.items.testActivateRecursive.xml (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actionbar.sections.pageActions.groups.activationActions.items.testActivateRecursive.xml (revision ) | |
| @@ -0,0 +1,24 @@ | |
| +<?xml version="1.0" encoding="UTF-8"?> | |
| +<sv:node sv:name="testActivateRecursive" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>108fc812-3a86-4d2a-9e47-4930b492c731</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:42.458+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:44.465+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| +</sv:node> | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationAction.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationAction.java (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationAction.java (revision ) | |
| @@ -0,0 +1,65 @@ | |
| +/** | |
| + * This file Copyright (c) 2015 Magnolia International | |
| + * Ltd. (http://www.magnolia-cms.com). All rights reserved. | |
| + * | |
| + * | |
| + * This file is dual-licensed under both the Magnolia | |
| + * Network Agreement and the GNU General Public License. | |
| + * You may elect to use one or the other of these licenses. | |
| + * | |
| + * This file is distributed in the hope that it will be | |
| + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the | |
| + * implied warranty of MERCHANTABILITY or FITNESS FOR A | |
| + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. | |
| + * Redistribution, except as permitted by whichever of the GPL | |
| + * or MNA you select, is prohibited. | |
| + * | |
| + * 1. For the GPL license (GPL), you can redistribute and/or | |
| + * modify this file under the terms of the GNU General | |
| + * Public License, Version 3, as published by the Free Software | |
| + * Foundation. You should have received a copy of the GNU | |
| + * General Public License, Version 3 along with this program; | |
| + * if not, write to the Free Software Foundation, Inc., 51 | |
| + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
| + * | |
| + * 2. For the Magnolia Network Agreement (MNA), this file | |
| + * and the accompanying materials are made available under the | |
| + * terms of the MNA which accompanies this distribution, and | |
| + * is available at http://www.magnolia-cms.com/mna.html | |
| + * | |
| + * Any modifications to this file must keep this entire header | |
| + * intact. | |
| + * | |
| + */ | |
| +package info.magnolia.test.fixture.action; | |
| + | |
| +import info.magnolia.commands.CommandsManager; | |
| +import info.magnolia.context.Context; | |
| +import info.magnolia.event.EventBus; | |
| +import info.magnolia.i18nsystem.SimpleTranslator; | |
| +import info.magnolia.ui.api.event.AdmincentralEventBus; | |
| +import info.magnolia.ui.framework.action.ActivationAction; | |
| +import info.magnolia.ui.framework.action.ActivationActionDefinition; | |
| + | |
| +import java.util.Map; | |
| + | |
| +import javax.inject.Named; | |
| +import javax.jcr.Item; | |
| + | |
| +/** | |
| + * UI action that allows to activate a single page (node) or recursively with all its sub-nodes depending on the value of {@link ActivationActionDefinition#isRecursive()}. | |
| + * This action will always change the requestor in param to user who has no permission. | |
| + */ | |
| +public class TestActivationAction extends ActivationAction { | |
| + public TestActivationAction(ActivationActionDefinition definition, info.magnolia.ui.vaadin.integration.jcr.JcrItemAdapter item, CommandsManager commandsManager, @Named(AdmincentralEventBus.NAME) EventBus admincentralEventBus, info.magnolia.ui.api.app.SubAppContext uiContext, SimpleTranslator i18n) { | |
| + super(definition, item, commandsManager, admincentralEventBus, uiContext, i18n); | |
| + } | |
| + | |
| + @Override | |
| + protected Map<String, Object> buildParams(final Item jcrItem) { | |
| + Map<String, Object> params = super.buildParams(jcrItem); | |
| + // Change user has no write access in this instance | |
| + params.put(Context.ATTRIBUTE_REQUESTOR, "oriole"); | |
| + return params; | |
| + } | |
| +} | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/pom.xml | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/pom.xml (revision 8a8978484d9a9d3045c419f200392d20d2917c62) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/pom.xml (revision ) | |
| @@ -17,6 +17,16 @@ | |
| <scope>provided</scope> | |
| </dependency> | |
| <dependency> | |
| + <groupId>info.magnolia.ui</groupId> | |
| + <artifactId>magnolia-ui-api</artifactId> | |
| + <scope>provided</scope> | |
| + </dependency> | |
| + <dependency> | |
| + <groupId>info.magnolia.ui</groupId> | |
| + <artifactId>magnolia-ui-framework</artifactId> | |
| + <scope>provided</scope> | |
| + </dependency> | |
| + <dependency> | |
| <groupId>info.magnolia</groupId> | |
| <artifactId>magnolia-templating</artifactId> | |
| <scope>provided</scope> | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationActionDefinition.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationActionDefinition.java (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/action/TestActivationActionDefinition.java (revision ) | |
| @@ -0,0 +1,52 @@ | |
| +/** | |
| + * This file Copyright (c) 2015 Magnolia International | |
| + * Ltd. (http://www.magnolia-cms.com). All rights reserved. | |
| + * | |
| + * | |
| + * This file is dual-licensed under both the Magnolia | |
| + * Network Agreement and the GNU General Public License. | |
| + * You may elect to use one or the other of these licenses. | |
| + * | |
| + * This file is distributed in the hope that it will be | |
| + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the | |
| + * implied warranty of MERCHANTABILITY or FITNESS FOR A | |
| + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. | |
| + * Redistribution, except as permitted by whichever of the GPL | |
| + * or MNA you select, is prohibited. | |
| + * | |
| + * 1. For the GPL license (GPL), you can redistribute and/or | |
| + * modify this file under the terms of the GNU General | |
| + * Public License, Version 3, as published by the Free Software | |
| + * Foundation. You should have received a copy of the GNU | |
| + * General Public License, Version 3 along with this program; | |
| + * if not, write to the Free Software Foundation, Inc., 51 | |
| + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
| + * | |
| + * 2. For the Magnolia Network Agreement (MNA), this file | |
| + * and the accompanying materials are made available under the | |
| + * terms of the MNA which accompanies this distribution, and | |
| + * is available at http://www.magnolia-cms.com/mna.html | |
| + * | |
| + * Any modifications to this file must keep this entire header | |
| + * intact. | |
| + * | |
| + */ | |
| +package info.magnolia.test.fixture.action; | |
| + | |
| + | |
| +import info.magnolia.ui.framework.action.ActivationActionDefinition; | |
| + | |
| +/** | |
| + * Test Activation action definition. By default performs a non-recursive activation. | |
| + * | |
| + * @see TestActivationAction | |
| + */ | |
| +public class TestActivationActionDefinition extends ActivationActionDefinition { | |
| + | |
| + private boolean recursive = true; | |
| + | |
| + public TestActivationActionDefinition() { | |
| + setImplementationClass(TestActivationAction.class); | |
| + } | |
| +} | |
| + | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/tests/src/test/java/info/magnolia/integrationtests/uitest/TestAsyncPublishAndChangeParamToUserWhoHasNotPermissionTest.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/tests/src/test/java/info/magnolia/integrationtests/uitest/TestAsyncPublishAndChangeParamToUserWhoHasNotPermissionTest.java (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/tests/src/test/java/info/magnolia/integrationtests/uitest/TestAsyncPublishAndChangeParamToUserWhoHasNotPermissionTest.java (revision ) | |
| @@ -0,0 +1,76 @@ | |
| +/** | |
| + * This file Copyright (c) 2013-2015 Magnolia International | |
| + * Ltd. (http://www.magnolia-cms.com). All rights reserved. | |
| + * | |
| + * | |
| + * This file is dual-licensed under both the Magnolia | |
| + * Network Agreement and the GNU General Public License. | |
| + * You may elect to use one or the other of these licenses. | |
| + * | |
| + * This file is distributed in the hope that it will be | |
| + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the | |
| + * implied warranty of MERCHANTABILITY or FITNESS FOR A | |
| + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. | |
| + * Redistribution, except as permitted by whichever of the GPL | |
| + * or MNA you select, is prohibited. | |
| + * | |
| + * 1. For the GPL license (GPL), you can redistribute and/or | |
| + * modify this file under the terms of the GNU General | |
| + * Public License, Version 3, as published by the Free Software | |
| + * Foundation. You should have received a copy of the GNU | |
| + * General Public License, Version 3 along with this program; | |
| + * if not, write to the Free Software Foundation, Inc., 51 | |
| + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
| + * | |
| + * 2. For the Magnolia Network Agreement (MNA), this file | |
| + * and the accompanying materials are made available under the | |
| + * terms of the MNA which accompanies this distribution, and | |
| + * is available at http://www.magnolia-cms.com/mna.html | |
| + * | |
| + * Any modifications to this file must keep this entire header | |
| + * intact. | |
| + * | |
| + */ | |
| +package info.magnolia.integrationtests.uitest; | |
| + | |
| +import static org.junit.Assert.*; | |
| + | |
| +import org.junit.Test; | |
| +import org.openqa.selenium.By; | |
| +import org.openqa.selenium.WebElement; | |
| + | |
| +/** | |
| + * Publishing and versioning test for pages app. Before calling command, trying to change the user who does async action to user who does not have permission in page. In this case, that user is oriole. | |
| + */ | |
| +public class TestAsyncPublishAndChangeParamToUserWhoHasNotPermissionTest extends PageEditorPublishingAndVersioningUITest { | |
| + | |
| + @Test | |
| + public void testPublishAndCheckVersions() { | |
| + // GIVEN | |
| + final String[] pathToArticle = new String[]{DEMO_PROJECT_PAGE, ABOUT_PAGE}; | |
| + | |
| + // WHEN | |
| + // Go to pages App | |
| + getAppIcon(PAGES_APP).click(); | |
| + // Navigate to the content to change | |
| + expandTreeAndSelectAnElement(SUBSECTION_ARTICLES, pathToArticle); | |
| + | |
| + // Publish changes | |
| + getActionBarItem("Test Publish").click(); | |
| + delay(5, "Activation takes some time so wait before checking the updated icon"); | |
| + | |
| + refreshTreeView(); | |
| + | |
| + // CHECK VERSIONS | |
| + getActionBarItem(SHOW_VERSIONS_ACTION).click(); | |
| + | |
| + // CHECK THE TAB HEADER | |
| + delay("Waiting before check"); | |
| + // Click on version drop-down to show versions | |
| + getSelectTabElement("Version").click(); | |
| + | |
| + // Check the first element in dropdown and make sure it contains eric | |
| + WebElement table = getSelectedTableElement(); | |
| + assertTrue(table.findElements(By.xpath("tbody/tr/td")).get(0).getText().contains("(oriole)")); | |
| + } | |
| +} | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actions.testActivateRecursive.xml | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actions.testActivateRecursive.xml (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap/test/config.modules.pages.apps.pages.subApps.browser.actions.testActivateRecursive.xml (revision ) | |
| @@ -0,0 +1,276 @@ | |
| +<?xml version="1.0" encoding="UTF-8"?> | |
| +<sv:node sv:name="testActivateRecursive" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> | |
| + <sv:value>mix:lockable</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>831c6107-33a0-4fcb-b461-3ab84cee6e01</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="asynchronous" sv:type="String"> | |
| + <sv:value>true</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="catalog" sv:type="String"> | |
| + <sv:value>website</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="class" sv:type="String"> | |
| + <sv:value>info.magnolia.test.fixture.action.TestActivationActionDefinition</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="command" sv:type="String"> | |
| + <sv:value>activate</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="icon" sv:type="String"> | |
| + <sv:value>icon-publish-incl-sub</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="label" sv:type="String"> | |
| + <sv:value>Test Publish</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.336+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T13:42:38.050+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="recursive" sv:type="String"> | |
| + <sv:value>true</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="successMessage" sv:type="String"> | |
| + <sv:value>Run action successfully</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="availability"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>c9705233-b90a-4dc0-8a8e-9071dc17e9f7</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.337+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="writePermissionRequired" sv:type="Boolean"> | |
| + <sv:value>true</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="access"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>399a8859-6cdd-4497-9ee2-bfaf0702e12c</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.337+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="roles"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>96a0a2bc-6b37-4d24-bbb0-c5bc41883b5b</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="demo-publisher" sv:type="String"> | |
| + <sv:value>demo-project-publisher</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.338+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="superuser" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + </sv:node> | |
| + <sv:node sv:name="rules"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> | |
| + <sv:value>mix:lockable</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>5e2d494a-7fcb-412b-9737-c02b7a3233ba</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.338+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="PageHasSubpagesAndIsNotDeletedRule"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> | |
| + <sv:value>mix:lockable</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>e37fa99b-3408-4679-9db8-2232b8498443</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="implementationClass" sv:type="String"> | |
| + <sv:value>info.magnolia.pages.app.availability.PageHasSubpagesAndIsNotDeletedRule</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.338+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="IsPublishableRule"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> | |
| + <sv:value>mix:lockable</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>261165b5-53f5-4498-b51a-0c5683277b9f</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="implementationClass" sv:type="String"> | |
| + <sv:value>info.magnolia.ui.framework.availability.IsPublishableRule</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:activationStatus" sv:type="Boolean"> | |
| + <sv:value>false</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.331+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivated" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:08:54.339+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-10T16:09:11.006+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + </sv:node> | |
| + </sv:node> | |
| +</sv:node> | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/setup/SetupStuffForTests.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/setup/SetupStuffForTests.java (revision 8a8978484d9a9d3045c419f200392d20d2917c62) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/java/info/magnolia/test/fixture/setup/SetupStuffForTests.java (revision ) | |
| @@ -37,6 +37,7 @@ | |
| import info.magnolia.module.delta.BootstrapSingleResource; | |
| import info.magnolia.module.delta.IsAuthorInstanceDelegateTask; | |
| import info.magnolia.module.delta.ModuleBootstrapTask; | |
| +import info.magnolia.module.delta.SamplesBootstrapTask; | |
| import info.magnolia.module.delta.Task; | |
| import java.util.ArrayList; | |
| @@ -62,6 +63,7 @@ | |
| final ArrayList<Task> basicInstallTasks = new ArrayList<Task>(); | |
| basicInstallTasks.addAll(super.getBasicInstallTasks(installContext)); | |
| basicInstallTasks.add(new ModuleBootstrapTask()); | |
| + basicInstallTasks.add(new SamplesBootstrapTask()); | |
| return basicInstallTasks; | |
| } | |
| Index: ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap-samples/test/users.admin.oriole.xml | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap-samples/test/users.admin.oriole.xml (revision ) | |
| +++ ../../git/magnolia-5.3-repo/ce-bundle/magnolia-integration-tests/magnolia-integration-tests-fixture-module/src/main/resources/mgnl-bootstrap-samples/test/users.admin.oriole.xml (revision ) | |
| @@ -0,0 +1,271 @@ | |
| +<?xml version="1.0" encoding="UTF-8"?> | |
| +<sv:node sv:name="oriole" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:user</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:mixinTypes" sv:type="Name" sv:multiple="true"> | |
| + <sv:value>mix:lockable</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>7a5e9eb5-7901-4c13-9578-9f0ebb338c39</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="email" sv:type="String"> | |
| + <sv:value/> | |
| + </sv:property> | |
| + <sv:property sv:name="enabled" sv:type="Boolean"> | |
| + <sv:value>true</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="failedLoginAttempts" sv:type="Long"> | |
| + <sv:value>0</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcrName" sv:type="String"> | |
| + <sv:value>oriole</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="language" sv:type="String"> | |
| + <sv:value>en</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="lastaccess" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:22.332+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:01.762+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="name" sv:type="String"> | |
| + <sv:value>oriole</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="pswd" sv:type="String"> | |
| + <sv:value>$2a$12$4VEB4r9J3NFigHrS2X3mIu6c.RQ6S5S8XENkY.IYJEby5buVCaW4G</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="title" sv:type="String"> | |
| + <sv:value>oriole</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="acl_users"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>482dbe99-afc2-4146-a84b-a0abbfc77c1b</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.061+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:node sv:name="0"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>f236cd0a-988b-40e4-933a-e4cc91212be9</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.062+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>8</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="00"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>842efdf0-2e10-4dc9-bd86-514442a77cea</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.063+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole/email</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>63</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="01"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>608f04af-0af4-46b4-98fc-3695923f09aa</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.063+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole/language</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>63</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="02"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>ba3f3131-ee17-4db9-aae1-74fe55c70427</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.063+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole/lastaccess</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>63</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="03"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>642f01c9-c0cb-47b9-9bb0-746e33855998</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.064+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole/pswd</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>63</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + <sv:node sv:name="04"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>0c5adf62-947c-40c2-913b-b93f580d0c18</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:created" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:05:02.064+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:createdBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="path" sv:type="String"> | |
| + <sv:value>/admin/oriole/title</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="permissions" sv:type="Long"> | |
| + <sv:value>63</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| + </sv:node> | |
| + <sv:node sv:name="roles"> | |
| + <sv:property sv:name="jcr:primaryType" sv:type="Name"> | |
| + <sv:value>mgnl:contentNode</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:uuid" sv:type="String"> | |
| + <sv:value>85295e4b-5450-4f07-a76a-a05f11a9fab8</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="00" sv:type="String"> | |
| + <sv:value>5308b62e-b710-4c40-845d-bae325cb8506</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="jcr:createdBy" sv:type="String"> | |
| + <sv:value>admin</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModified" sv:type="Date"> | |
| + <sv:value>2015-11-11T11:21:13.428+07:00</sv:value> | |
| + </sv:property> | |
| + <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String"> | |
| + <sv:value>superuser</sv:value> | |
| + </sv:property> | |
| + </sv:node> | |
| +</sv:node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/CommandJob.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/CommandJob.java (revision 58601a93456c949bce70c90b8b2a3501b2b37d1d) | |
| +++ ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/CommandJob.java (revision ) | |
| @@ -33,7 +33,9 @@ | |
| */ | |
| package info.magnolia.module.scheduler; | |
| +import info.magnolia.cms.security.SecuritySupport; | |
| import info.magnolia.cms.security.SilentSessionOp; | |
| +import info.magnolia.cms.security.User; | |
| import info.magnolia.commands.CommandsManager; | |
| import info.magnolia.commands.chain.Command; | |
| import info.magnolia.context.Context; | |
| @@ -45,6 +47,7 @@ | |
| import java.util.Map; | |
| +import javax.inject.Inject; | |
| import javax.jcr.Node; | |
| import javax.jcr.RepositoryException; | |
| import javax.jcr.Session; | |
| @@ -64,6 +67,23 @@ | |
| private static Logger log = LoggerFactory.getLogger(CommandJob.class); | |
| + private final SystemContext systemContext; | |
| + private final SecuritySupport securitySupport; | |
| + private final MagnoliaConfigurationProperties magnoliaProperties; | |
| + private final CommandsManager commandsManager; | |
| + | |
| + public CommandJob() { | |
| + this(Components.getComponent(SystemContext.class), SecuritySupport.Factory.getInstance(), Components.getComponent(MagnoliaConfigurationProperties.class), Components.getComponent(CommandsManager.class)); | |
| + } | |
| + | |
| + @Inject | |
| + public CommandJob(SystemContext systemContext, SecuritySupport securitySupport, MagnoliaConfigurationProperties magnoliaProperties, CommandsManager commandsManager) { | |
| + this.systemContext = systemContext; | |
| + this.securitySupport = securitySupport; | |
| + this.magnoliaProperties = magnoliaProperties; | |
| + this.commandsManager = commandsManager; | |
| + } | |
| + | |
| /** | |
| * Called by the scheduler. Get the command. Create a magnolia context. | |
| */ | |
| @@ -72,12 +92,18 @@ | |
| log.info("Starting job [{}]...", jobCtx.getJobDetail().getName()); | |
| Map jobData = jobCtx.getJobDetail().getJobDataMap(); | |
| - String instanceClusterId = Components.getComponent(MagnoliaConfigurationProperties.class).getProperty("magnolia.clusterid"); | |
| + String instanceClusterId = magnoliaProperties.getProperty("magnolia.clusterid"); | |
| String jobClusterId = null; | |
| + User user = null; | |
| if (jobData.containsKey(SchedulerConsts.CONFIG_JOB_PARAMS) && jobData.get(SchedulerConsts.CONFIG_JOB_PARAMS) != null) { | |
| - jobClusterId = (String) ((Map) jobData.get(SchedulerConsts.CONFIG_JOB_PARAMS)).get("clusterId"); | |
| + Map params = (Map) jobData.get(SchedulerConsts.CONFIG_JOB_PARAMS); | |
| + jobClusterId = (String) params.get("clusterId"); | |
| + if (params.containsKey(SchedulerConsts.ATTRIBUTE_REQUESTOR)) { | |
| + String requester = (String) params.get(SchedulerConsts.ATTRIBUTE_REQUESTOR); | |
| + user = securitySupport.getUserManager().getUser(requester); | |
| - } | |
| + } | |
| + } | |
| String catalogName = (String) jobData.get(SchedulerConsts.CONFIG_JOB_COMMAND_CATALOG); | |
| String cmdName = (String) jobData.get(SchedulerConsts.CONFIG_JOB_COMMAND); | |
| @@ -85,8 +111,7 @@ | |
| if (StringUtils.isBlank(jobClusterId) || jobClusterId.equals(instanceClusterId)) { | |
| try { | |
| // init context | |
| - MgnlContext.setInstance(new SimpleContext(Components.getComponent(SystemContext.class))); | |
| - | |
| + MgnlContext.setInstance(new SimpleContext(systemContext, user)); | |
| Command cmd = Components.getComponent(CommandsManager.class).getCommand(catalogName, cmdName); | |
| if (cmd == null) { | |
| String errorMessage = "Can't find command [" + cmdName + "] for job in catalog [{" + catalogName + "}]"; | |
| Index: ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/SchedulerConsts.java | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/SchedulerConsts.java (revision 58601a93456c949bce70c90b8b2a3501b2b37d1d) | |
| +++ ../../git/magnolia-5.3-repo/scheduler/magnolia-module-scheduler/src/main/java/info/magnolia/module/scheduler/SchedulerConsts.java (revision ) | |
| @@ -70,6 +70,11 @@ | |
| static final String CONFIG_JOB_COMMAND = "command"; | |
| /** | |
| + * Name of the user that has launched the command. | |
| + */ | |
| + static final String ATTRIBUTE_REQUESTOR = info.magnolia.context.Context.ATTRIBUTE_REQUESTOR; | |
| + | |
| + /** | |
| * The group name we use to work with the scheduler. | |
| */ | |
| static final String SCHEDULER_GROUP_NAME = "magnolia"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment