|
Modified: ofbiz/branches/jackrabbit20120501/applications/product/config/ProductEntityLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/config/ProductEntityLabels.xml?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/applications/product/config/ProductEntityLabels.xml (original) +++ ofbiz/branches/jackrabbit20120501/applications/product/config/ProductEntityLabels.xml Wed Jun 13 18:01:08 2012 @@ -2112,6 +2112,7 @@ <value xml:lang="zh_TW">é·å®</value> </property> <property key="ProductMaintType.description.CHASSIS_LUBE"> + <value xml:lang="de">Fahrwerk Schmierung</value> <value xml:lang="en">Chassis Lubrication</value> <value xml:lang="it">Lubrificazione telaio</value> <value xml:lang="vi">Bôi trÆ¡n khung gầm</value> @@ -2127,6 +2128,7 @@ <value xml:lang="zh_TW">檢æ¥é»æ± </value> </property> <property key="ProductMaintType.description.HVAC_CHECK_REFR"> + <value xml:lang="de">Kühlflüssigkeit prüfen/nachfüllen</value> <value xml:lang="en">Check/Recharge Refrigerant</value> <value xml:lang="it">Controllo/Ricarica refrigerante</value> <value xml:lang="vi">Kiá»m tra/Nạp thêm gas là m lạnh</value> @@ -2189,6 +2191,7 @@ <value xml:lang="zh_TW">æ´æé»æ± </value> </property> <property key="ProductMaintType.description.ROTATE_TIRES"> + <value xml:lang="de">Reifen drehen</value> <value xml:lang="en">Rotate Tires</value> <value xml:lang="it">Invertire le gomme</value> <value xml:lang="vi">Rotate Tires</value> @@ -2196,7 +2199,7 @@ <value xml:lang="zh_TW">輪è輪æ</value> </property> <property key="ProductMaintType.description.SERP_BELT"> - <value xml:lang="de">Keilriemen Ersatz</value> + <value xml:lang="de">Keilriemen ersetzen</value> <value xml:lang="en">Serpentine Belt Replacement</value> <value xml:lang="es">Cambio de correa</value> <value xml:lang="fr">Remplacement de courroie serpentine</value> @@ -2209,6 +2212,7 @@ <value xml:lang="zh_TW">æ´æå¹³å¸¶</value> </property> <property key="ProductMaintType.description.TUNE_UP"> + <value xml:lang="de">Einstellen</value> <value xml:lang="en">Tune Up</value> <value xml:lang="it">Mettere a punto</value> <value xml:lang="vi">Lên dây</value> @@ -2216,7 +2220,7 @@ <value xml:lang="zh_TW">調é³</value> </property> <property key="ProductMaintType.description.VEHICLE_MAINT"> - <value xml:lang="de">Fahrzeug Instandhaltung</value> + <value xml:lang="de">Fahrzeugwartung</value> <value xml:lang="en">Vehicle Maintenance</value> <value xml:lang="es">Mantenimiento de vehÃculo</value> <value xml:lang="fr">Révision du véhicule</value> @@ -2329,6 +2333,7 @@ <value xml:lang="zh_TW">使ç¨è¨æ¸è¡¨</value> </property> <property key="ProductMeterType.description.TRIP_METER"> + <value xml:lang="en">Tageskilometerzähler</value> <value xml:lang="en">Use Trip Meter</value> <value xml:lang="fr">Utiliser le compteur de distance par trajet</value> <value xml:lang="vi">Sá» dụng Äá»ng há» Äo quãng ÄÆ°á»ng chuyến Äi</value> Modified: ofbiz/branches/jackrabbit20120501/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/config/ProductUiLabels.xml?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/jackrabbit20120501/applications/product/config/ProductUiLabels.xml Wed Jun 13 18:01:08 2012 @@ -21769,6 +21769,7 @@ <property key="ProductPromoCodeLength"> <value xml:lang="de">Aktionscodelänge</value> <value xml:lang="en">product promo code length</value> + <value xml:lang="fr">Longueur du code promo</value> <value xml:lang="vi">Äá» dà i mã khuyến mại</value> </property> <property key="ProductPromoCodeParties"> @@ -21804,6 +21805,10 @@ <value xml:lang="zh">ä¿é/伿 å¸ä»£ç </value> <value xml:lang="zh_TW">ä¿é·/åªæ å¸ä»£ç¢¼</value> </property> + <property key="ProductPromoCodesCreated"> + <value xml:lang="en">Following PromoCodes have been created: </value> + <value xml:lang="fr">Les codes promo suivants ont été créés : </value> + </property> <property key="ProductPromoCodesEntered"> <value xml:lang="de">Eingegebene Codes:</value> <value xml:lang="en">Entered Codes:</value> @@ -21875,22 +21880,27 @@ <property key="ProductPromoLayoutSmart"> <value xml:lang="de">clever</value> <value xml:lang="en">smart</value> + <value xml:lang="fr">intelligent</value> </property> <property key="ProductPromoLayoutNormal"> <value xml:lang="de">normal</value> <value xml:lang="en">normal</value> + <value xml:lang="fr">normal</value> </property> <property key="ProductPromoLayoutSeqNum"> <value xml:lang="de">Sequenz</value> <value xml:lang="en">sequence</value> + <value xml:lang="fr">séquence</value> </property> <property key="ProductPromoCodeLayout"> <value xml:lang="de">Aussehen vom Aktionscode</value> <value xml:lang="en">Promo code layout</value> + <value xml:lang="fr">Format de code promo</value> </property> <property key="ProductPromoCodeLayoutTooltip"> <value xml:lang="de">"clever": Vermeidet ähnliche Zeichen (0 und O, ...) | "normal": Alphanummerisch | "sequenz": Laufnummer</value> <value xml:lang="en">"smart": Avoids equal Chars (0 and O, ...) | "normal": alphanumeric | "sequence": Sequence Number</value> + <value xml:lang="fr">"intelligent": Ãviter les charactères identiques (0 et O, ...) | "normal": alphanumérique | "séquence": séquence numérique</value> </property> <property key="ProductPromos"> <value xml:lang="de">Aktionen</value> Modified: ofbiz/branches/jackrabbit20120501/applications/product/data/ProductSecurityData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/data/ProductSecurityData.xml?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/applications/product/data/ProductSecurityData.xml (original) +++ ofbiz/branches/jackrabbit20120501/applications/product/data/ProductSecurityData.xml Wed Jun 13 18:01:08 2012 @@ -77,22 +77,6 @@ under the License. <SecurityGroupPermission groupId="VIEWADMIN" permissionId="SHIPRATE_VIEW"/> <SecurityGroupPermission groupId="BIZADMIN" permissionId="SHIPRATE_ADMIN"/> - <!-- Facility Manager security --> - <SecurityPermission description="View operations in the Facility Manager." permissionId="FACILITY_VIEW"/> - <SecurityPermission description="Create operations in the Facility Manager." permissionId="FACILITY_CREATE"/> - <SecurityPermission description="Update operations in the Facility Manager." permissionId="FACILITY_UPDATE"/> - <SecurityPermission description="Delete operations in the Facility Manager." permissionId="FACILITY_DELETE"/> - <SecurityPermission description="ALL operations in the Facility Manager." permissionId="FACILITY_ADMIN"/> - <SecurityPermission description="Limited view operations in the Facility Manager." permissionId="FACILITY_ROLE_VIEW"/> - <SecurityPermission description="Limited update operations in the Facility Manager." permissionId="FACILITY_ROLE_UPDATE"/> - <SecurityGroupPermission groupId="FULLADMIN" permissionId="FACILITY_ADMIN"/> - <SecurityGroupPermission groupId="FLEXADMIN" permissionId="FACILITY_CREATE"/> - <SecurityGroupPermission groupId="FLEXADMIN" permissionId="FACILITY_DELETE"/> - <SecurityGroupPermission groupId="FLEXADMIN" permissionId="FACILITY_UPDATE"/> - <SecurityGroupPermission groupId="FLEXADMIN" permissionId="FACILITY_VIEW"/> - <SecurityGroupPermission groupId="VIEWADMIN" permissionId="FACILITY_VIEW"/> - <SecurityGroupPermission groupId="BIZADMIN" permissionId="FACILITY_ADMIN"/> - <!-- Image Management security --> <SecurityGroup description="Image Management Admin." groupId="IMAGEADMIN"/> <SecurityPermission description="All operations in the Image Management." permissionId="IMAGE_MANAGEMENT_ADMIN"/> Modified: ofbiz/branches/jackrabbit20120501/applications/product/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/ofbiz-component.xml?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/applications/product/ofbiz-component.xml (original) +++ ofbiz/branches/jackrabbit20120501/applications/product/ofbiz-component.xml Wed Jun 13 18:01:08 2012 @@ -38,6 +38,7 @@ under the License. <entity-resource type="data" reader-name="seed" loader="main" location="data/ProductHelpData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ShipmentTypeData.xml"/> <entity-resource type="data" reader-name="security" loader="main" location="data/ProductSecurityData.xml"/> + <entity-resource type="data" reader-name="security" loader="main" location="data/FacilitySecurityData.xml"/> <entity-resource type="data" reader-name="demo" loader="main" location="data/ProductDemoData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ApiSchemaDhl.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/DimensionTypeData.xml"/> Modified: ofbiz/branches/jackrabbit20120501/applications/product/src/org/ofbiz/product/promo/PromoServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/applications/product/src/org/ofbiz/product/promo/PromoServices.java?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/applications/product/src/org/ofbiz/product/promo/PromoServices.java (original) +++ ofbiz/branches/jackrabbit20120501/applications/product/src/org/ofbiz/product/promo/PromoServices.java Wed Jun 13 18:01:08 2012 @@ -60,6 +60,7 @@ public class PromoServices { 'Z', '2', '3', '4', '5', '6', '7', '8', '9' }; public static Map<String, Object> createProductPromoCodeSet(DispatchContext dctx, Map<String, ? extends Object> context) { + Locale locale = (Locale) context.get("locale"); Delegator delegator = dctx.getDelegator(); LocalDispatcher dispatcher = dctx.getDispatcher(); Long quantity = (Long) context.get("quantity"); @@ -77,7 +78,7 @@ public class PromoServices { String newPromoCodeId = ""; StringBuilder bankOfNumbers = new StringBuilder(); - bankOfNumbers.append("Following PromoCodes have been created: "); + bankOfNumbers.append(UtilProperties.getMessage(resource, "ProductPromoCodesCreated", locale)); for (long i = 0; i < quantity; i++) { Map<String, Object> createProductPromoCodeMap = null; boolean foundUniqueNewCode = false; @@ -110,11 +111,11 @@ public class PromoServices { newContext.put("productPromoCodeId", newPromoCodeId); createProductPromoCodeMap = dispatcher.runSync("createProductPromoCode", newContext); } catch (GenericServiceException err) { - return ServiceUtil.returnError("Could not create a bank of promo codes", null, null, createProductPromoCodeMap); + return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductPromoCodeCannotBeCreated", locale), null, null, createProductPromoCodeMap); } if (ServiceUtil.isError(createProductPromoCodeMap)) { // what to do here? try again? - return ServiceUtil.returnError("Could not create a bank of promo codes", null, null, createProductPromoCodeMap); + return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ProductPromoCodeCannotBeCreated", locale), null, null, createProductPromoCodeMap); } bankOfNumbers.append((String) createProductPromoCodeMap.get("productPromoCodeId")); bankOfNumbers.append(","); Modified: ofbiz/branches/jackrabbit20120501/framework/common/webcommon/WEB-INF/common-controller.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/common/webcommon/WEB-INF/common-controller.xml?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/framework/common/webcommon/WEB-INF/common-controller.xml (original) +++ ofbiz/branches/jackrabbit20120501/framework/common/webcommon/WEB-INF/common-controller.xml Wed Jun 13 18:01:08 2012 @@ -41,9 +41,6 @@ under the License. <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/> <handler name="screentext" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/> <handler name="screencsv" type="view" class="org.ofbiz.widget.screen.MacroScreenViewHandler"/> - <!--handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/> - <handler name="screenxml" type="view" class="org.ofbiz.widget.screen.ScreenXmlViewHandler"/> - <handler name="screentext" type="view" class="org.ofbiz.widget.screen.ScreenTextViewHandler"/--> <handler name="screenfop" type="view" class="org.ofbiz.widget.screen.ScreenFopViewHandler"/> <handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/> <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/> Modified: ofbiz/branches/jackrabbit20120501/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTenantTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTenantTests.java?rev=1349976&r1=1349975&r2=1349976&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20120501/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTenantTests.java (original) +++ ofbiz/branches/jackrabbit20120501/framework/jcr/src/org/ofbiz/jcr/test/JackrabbitTenantTests.java Wed Jun 13 18:01:08 2012 @@ -1,21 +1,3 @@ -/* -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - */ package org.ofbiz.jcr.test; import java.util.GregorianCalendar; @@ -28,41 +10,69 @@ import org.ofbiz.entity.DelegatorFactory import org.ofbiz.entity.GenericValue; import org.ofbiz.jcr.api.JcrDataHelper; import org.ofbiz.jcr.api.jackrabbit.JackrabbitArticleHelper; -import org.ofbiz.jcr.orm.jackrabbit.data.JackrabbitArticle; import org.ofbiz.service.testtools.OFBizTestCase; public class JackrabbitTenantTests extends OFBizTestCase { - private GenericValue userLogin = null; + private GenericValue userLogin = null; + private Delegator tenantDelegator = null; + private GenericValue tenantUserLogin = null; + + public JackrabbitTenantTests(String name) { + super(name); + } + + @Override + protected void setUp() throws Exception { + userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin")); + + // tenant delegator + String delegatorName = delegator.getDelegatorBaseName() + "#DEMO1"; + tenantDelegator = DelegatorFactory.getDelegator(delegatorName); + assertNotNull(tenantDelegator); + + tenantUserLogin = tenantDelegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin")); + assertNotNull(tenantUserLogin); + + } + + @Override + protected void tearDown() throws Exception { + } + + public void testTenantAccess() throws Exception { + // Store data with normal user + JcrDataHelper helper = new JackrabbitArticleHelper(userLogin, delegator); + helper.storeContentInRepository("news/article", "en", "News Of Today", "Hello World", new GregorianCalendar()); + helper.closeContentSession(); + + // check if content is available for tenant user (shouldn't) + JcrDataHelper tenantHelper = new JackrabbitArticleHelper(tenantUserLogin, tenantDelegator); + try { + tenantHelper.readContentFromRepository("news/article"); + fail("Expected a PathNotFoundException."); + } catch (PathNotFoundException pe) { + assertTrue("A PathNotFoundException is catched as expected.", true); + } + + tenantHelper.closeContentSession(); + } + + public void testTenantAccess_2() throws Exception { + // check if content is available for tenant user (shouldn't) + JcrDataHelper tenantHelper = new JackrabbitArticleHelper(tenantUserLogin, tenantDelegator); + tenantHelper.storeContentInRepository("tenant/article", "de", "tenant", "Foo", new GregorianCalendar()); + tenantHelper.closeContentSession(); + + // Store data with normal user + JcrDataHelper helper = new JackrabbitArticleHelper(userLogin, delegator); + try { + helper.readContentFromRepository("tenant/article"); + fail("Expected a PathNotFoundException."); + } catch (PathNotFoundException pe) { + assertTrue("A PathNotFoundException is catched as expected.", true); + } + helper.closeContentSession(); + } - public JackrabbitTenantTests(String name) { - super(name); - } - - @Override - public void setUp() throws Exception { - userLogin = delegator.findOne("UserLogin", UtilMisc.toMap("userLoginId", "system"), true); - } - - public void testTenant() throws Exception { - - JcrDataHelper helper = new JackrabbitArticleHelper(userLogin, delegator); - helper.storeContentInRepository("news/article", "en", "News Of Today", "Hello World", new GregorianCalendar()); - - JackrabbitArticle content = helper.readContentFromRepository("news/article"); - assertEquals("Hello World", content.getContent()); - helper.closeContentSession(); - - String delegatorName = delegator.getDelegatorBaseName() + "#DEMO1"; - Delegator tenantDelegator = DelegatorFactory.getDelegator(delegatorName); - - JcrDataHelper tenantHelper = new JackrabbitArticleHelper(userLogin, tenantDelegator); - try { - tenantHelper.readContentFromRepository("news/article"); - fail("PathNotFoundException expected"); - } catch (PathNotFoundException e) { - assertTrue("Caught a PathNotFoundExcpetion as expected.", true); - } - tenantHelper.closeContentSession(); - } -} +} \ No newline at end of file |
| Free forum by Nabble | Edit this page |
