Commit Graph
27737 Commits
Author SHA1 Message Date
Deepak Dixit 2cc30104b1 (OFBIZ-6584) Display submitter partyId on edit response screen. Now if submitter partyId exists then display the same else logged-in partyId will be displayed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706549 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 11:35:52 +00:00
Arun Patidar f628022292 [OFBIZ-6650] Fixed a typo in product.groovy which causing error on redering product page. Removed additional ')' from the statement
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706531 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 09:30:52 +00:00
Jacques Le Roux 383a7f3641 Adds a French label
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706371 13f79535-47bb-0310-9956-ffa450edef68
2015-10-02 11:01:11 +00:00
Jacques Le Roux c4f05659be A patch from Martin Becker for "data import - nulling fields impossible" https://issues.apache.org/jira/browse/OFBIZ-293
In my opinion it would be straight forward, if the entity import would treat fields that are mentioned in entity XML files as fields that should be updated always, as the GenericDAO does. The current logic ignores fields, if there is only an empty string as value.

The enhancement brought by the solution of OFBIZ-4949 makes it possible to generally configure an entity-engine-xml file to be interpreted as replacement, so that all NOT mentioned fields are set to NULL instead of leaving the old value while updating the entity.

Nevertheless I think, that the default (update) behavior, the one with fine grained control over which fields are touched, should also give the possibility to set field values to NULL by including them in the XML.

The solution with the lowest impact on existing XML files and the most natural meaning should be to interpret empty string values in the XML as NULL, as it is today. The only difference would be, that they are not longer ignored but set as NULL values in the database. The only drawback I see is, that you're still not able to set "empty string" values as concrete values to the database (no loss of function, because you can't do it today, too).

As far as I can see, there should be no conflict with current existing data files. There are some where for example a parentTypeId is contained with empty string as value. Interpreting it as NULL and setting in database is exactly what is meant by such a definition.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706316 13f79535-47bb-0310-9956-ffa450edef68
2015-10-01 20:24:17 +00:00
Jacques Le Roux 07ebf50fad While working on r1705329 I did not notice that OrderContentWrapper was not using the same scheme than other *ContentWrapper (implementing ContentWrapper interface). This fixes it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706162 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 21:47:15 +00:00
Jacques Le Roux 079700cac3 Fixes a typo introduced with r1705329
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1706159 13f79535-47bb-0310-9956-ffa450edef68
2015-09-30 21:36:33 +00:00
Jacques Le Roux 77f358a0f4 Fixes a typo introduced with r1705329
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705532 13f79535-47bb-0310-9956-ffa450edef68
2015-09-27 12:22:51 +00:00
Jacques Le Roux 612c74a1f6 Still missed those ones in groovy after r1705329
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705427 13f79535-47bb-0310-9956-ffa450edef68
2015-09-26 12:03:26 +00:00
Jacques Le Roux 0beac33c9f I spotted some misses in FTL templates after r1705329, this fixes them
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705417 13f79535-47bb-0310-9956-ffa450edef68
2015-09-26 11:52:31 +00:00
Jacques Le Roux 576b5e8fd8 I just spotted cases like
categoryContentWrapper.DESCRIPTION; 
before committing r1705405. This fixes them

Thanks also for Deepak's report about it, it was obvious when you loaded the ecommerce apps


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705412 13f79535-47bb-0310-9956-ffa450edef68
2015-09-26 11:20:18 +00:00
Jacques Le Roux 5b93df6716 I missed some cases, if ever you spot some others or typos please let me know
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705405 13f79535-47bb-0310-9956-ffa450edef68
2015-09-26 10:24:02 +00:00
Jacques Le Roux cc47525c7c I found a possible XSS attack through ProductContentWrapper.java.getProductContentAsText() which is notably used in several FTL files. This exists also in others *ContentWrapper.java.
Note that in supported releases it's hard to exploit, it's a Stored XSS https://www.owasp.org/index.php/Types_of_Cross-Site_Scripting which means you need 1st to somehow inject exploiting code in the DB.

This fixes it by changing the ContentWrapper interface
from
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId);
    }
to
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
    }

And changing the Category, Party, Product, ProductPromo and WorkEffort ContentWrapperS accordingly. This means to use 2 types of encoderTypes: "html" and "url".
The "html"  encoderType will be used for all ProductContentTypes but those who contain URL in their ContentTypeIdS (actually end with, "_URL") which will use "url" encoderType.
It concerns not only the get() method but also methods like getPartyContentAsText(), getProductContentAsText(), etc.

It seems a big change but it's straightforward. It's normally complete. 

There are some (unrelated) tabs replaced by spaces here and there, and few trailing spaces removed but nothing big

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705329 13f79535-47bb-0310-9956-ffa450edef68
2015-09-25 16:27:12 +00:00
Jacques Le Roux 98257efe95 No functional change, while reviewing new OFBIZ-293 proposition I stumbled upon this. The value="null" is here unnecessary and confusing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705136 13f79535-47bb-0310-9956-ffa450edef68
2015-09-24 20:28:21 +00:00
Jacques Le Roux d9d30bda83 A patch from Oleg Andreyev for "Errors in ProductSummary.groovy" https://issues.apache.org/jira/browse/OFBIZ-6652
In all releases the code in ProductSummary.groovy tries to collect prices for variants. Doing so it use NumberFormat.format() to transform base price into string that is part of an embed JS snippet. In case purchase order this price is rather empty. Using null with formatting method cause error. You may see this error in the trunk if you starts PO and and try Browser Categories->Widgets->Small Widgets. This price should appear if you select Select Units of Measure for WG-1111 but currently this does not work.
I'm not sure these prices make sense for purchase orders but my goal was just fix ugly error message. Solution display N/A if price is not available. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1705004 13f79535-47bb-0310-9956-ffa450edef68
2015-09-24 07:02:17 +00:00
Jacques Le Roux 925c51d691 Referring to the excellent answer at https://stackoverflow.com/questions/14231037/java-safevarargs-annotation-does-a-standard-or-best-practice-exist it's safe to put SafeVarargs annotation here (it's only used to iterate over the elements). I was curious about that
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704771 13f79535-47bb-0310-9956-ffa450edef68
2015-09-23 08:15:50 +00:00
Jacques Le Roux 2a8dadbc91 No functional changes for https://issues.apache.org/jira/browse/OFBIZ-6651
Removes unused methods (not in Java code, FTL templates and Groovy scripts) in GenericValue and EntityUtil classes + misc related comments or logs
Adds log warning to spot possible use cases in templates and scripts of getRelated() and getRelatedOne() methods

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704769 13f79535-47bb-0310-9956-ffa450edef68
2015-09-23 08:03:45 +00:00
Jacques Le Roux de625ab66b No functional change: in relation with OFBIZ-6649, though we have not (yet) removed the deprecated methods from GenericValue this commit replaces deprecated getRelated() calls in a 1st preparation of this removing .
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704666 13f79535-47bb-0310-9956-ffa450edef68
2015-09-22 16:36:57 +00:00
Jacques Le Roux 4b303f5505 An enhanced patch from Pierre Smits for "Order items for GZ-1006-5 via ecommerce/ordermgr shows error" https://issues.apache.org/jira/browse/OFBIZ-6643
When an order is entered via the ecommerce component for a GZ-1006-5 an error is shown in the order items section

jleroux: actually, as Vyom Jain suggested "This is happening due to changes OFBIZ-6276. Either r1704108 should be reverted or additional patches be provided to avoid this reported issue (which is only one of them). Removing deprecated delegator methods require thorough testing as many as used in scripts and templates." I checked there was only 3 such changes for findByAnd and no others but getRelated where called in *.ftl and *.groovy. This completes the findByAnd case I will create a new Jira for the rest (did not check already, 238 cases!)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704478 13f79535-47bb-0310-9956-ffa450edef68
2015-09-22 08:31:46 +00:00
Jacques Le Roux f4bbab38a7 A modified patch from Oleg Andreyev for "Non-breaking space incorrectly encoded in forms" https://issues.apache.org/jira/browse/OFBIZ-6642
jleroux: rather than replacing   by   as Oleg suggested, I removed or replaced by spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704230 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 08:13:56 +00:00
Jacques Le Roux 708a59c1b9 Err goofy, I forgot to save (related with OFBIZ-6598) after reverting pending changes I did to test OFBIZ-6111 locally
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704228 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 08:00:45 +00:00
Jacques Le Roux 15520297ff A patch from Pierre Smits for "Replace bsf event type and handler with groovy" https://issues.apache.org/jira/browse/OFBIZ-6598
jleroux: I did the same in order controller (was only in ecommerce) even if only a commented out example was used there

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704227 13f79535-47bb-0310-9956-ffa450edef68
2015-09-21 07:54:13 +00:00
Jacques Le Roux 533a073feb A patch from Martin Becker for "Eclipse .classpath contains internal Groovy Library classpath container" https://issues.apache.org/jira/browse/OFBIZ-6640
There are unnecessarily eclipse internal Groovy Library classpath container referenced in the .classpath file. This may lead to conflicts with the OFBiz "original" groovy libs contained in the framework and produces errors while running OFBiz within eclipse.

{{<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>}}
{{<classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>}}

I'll provide a patch for this.

jleroux: I must say I never clearly understood nor researched why we should hace those :D

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704146 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 14:02:59 +00:00
Jacques Le Roux e814250573 A patch from Martin Becker for "Missing CountryCodeData.xml values for countries of the former Yugoslavia" https://issues.apache.org/jira/browse/OFBIZ-6641
Instead of former YUGOSLAVIA there should be SERBIA.
Also CountryTeleCode and CountryCapital is missing for MONTENEGRO.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704140 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 13:56:40 +00:00
Jacques Le Roux 73d02547cd A patch from Christian Carlow for "FOP renderer does not support alternate row style" https://issues.apache.org/jira/browse/OFBIZ-6355
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704137 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 13:48:26 +00:00
Jacques Le Roux e4cfb02613 A patch from Christian Carlow for "FOP renderer doesn't apply title-area-style" https://issues.apache.org/jira/browse/OFBIZ-6356
NotoSans is the defaultFontFamily for FOP and the extra stylings and the font-weight="bold" are not rendered correctly unless changed to another font family

jleroux: this needs clarification, I will ask Christian 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704130 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 13:42:16 +00:00
Jacques Le Roux 39ab353837 A patch from Martin Becker from a Gareth Carter's idea for "Fix deprecation issues in framework/entity" https://issues.apache.org/jira/browse/OFBIZ-6276
As reported Adam:
It appears that the storeAll() variants are being refactor; basically, the useCache parameter is being removed.  However, this has caused the entity engine to have deprecation with itself.

Gareth suggested:
What about new method that allows passing in an options object
storeAll(List<GenericValue> values, StoreOptions options) ?
You can deprecate the old methods without changes
Moving forward, you would just need to add new values to the StoreOptions class rather than adding new parameters to the existing one
I am not sure about the name StoreOptions though, EntityOptions ?

Martin contributed the implementation and suggested EntityStoreOptions for the new class name.
Ha created a patch which removes the use of deprecated API and the deprecated API itself from Delegator and GenericDelegator.
Introduced the EntityStoreOptions class as mentioned in a comment before to substitute the createDummyFks parameter of storeAll method to avoid ambiguous API after removing the deprecated doCacheClear parameter.
The decryptFieldValue method, just defined deprecated by Jacopo is left there as deprecated. Only the "old" deprecated methods where removed.

Gil Portenseigne supplied a pure svn patch, actually I had conflicting pending changes locally which prevented me to apply Martin's original patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704108 13f79535-47bb-0310-9956-ffa450edef68
2015-09-20 08:37:51 +00:00
Jacques Le Roux 55ea7a66d4 A patch from François Lecomte for "Adding the week number in date picking dropdowns" https://issues.apache.org/jira/browse/OFBIZ-5361
For some users, having the week shown in dropdown calendars is an important thing.
There is an option to show week numbers in the dropdown date picker used by OFBiz. (datetimepicker)
It can be done by adding "showWeek: true," in the datetimepicker calls in framework/widget/templates/htmlFormMacroLibrary.ftl.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704086 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 20:01:17 +00:00
Jacques Le Roux d34955cd4b A patch from Gil Portenseigne for "multiple select dropdown listbox shows only one entry" https://issues.apache.org/jira/browse/OFBIZ-6627
Wai reported:
Use this link https://localhost:8443/ordermgr/control/FindRequest
Notice the customer request type id, status id, etc

This patch extend existing asm dropdown implementation to allow several asm dropdown in the same form using a simple ftl.
Find Request use the new ftl in this example.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704082 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 19:53:47 +00:00
Michael Brohl 18bb9d6717 Applied patch for OFBIZ-6635: Old UserLogin from userLoginId-change is not correctly disabled.
If a userLoginId of an existing user is updated by LoginServices.updateUserLoginId, a new UserLogin value is created with the data of the old one and the old one is disabled afterwards. In addition to switch the enabled flag to "N" the disabledDateTime is set to current date. This is wrong because this makes it possible to reenable the old UserLogin by just do a login with the old userLoginId (standard mechanism to lock the login for a while after subsequent failed login requests).

Thanks Martin Becker for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704052 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 16:02:15 +00:00
Michael Brohl cd6eedc2c3 Applied patch for OFBIZ-6632: Incorrect comparison in TemporalExpressionWorker.java
This patch introduces some constants for the expression types and corrects the wrong comparison.

Thanks Vyom Jain for spotting this issue and Martin Becker for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704043 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 14:27:54 +00:00
Michael Brohl ab33193186 Applied patch for OFBIZ-6515: partymgr/control/EditPartyRelationships add odd-row="alternate-row" for ListPartRelationships and remove navigation-form-name for containing screenlet for better UI.
Displays the relationship table with alternate colors for better visibility and uses the screenlet pagination controls at top/bottom of the list.

Thanks Christian Carlow for this improvement.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704036 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 14:11:25 +00:00
Michael Brohl 89313da8b9 Applied patch for OFBIZ-6633: Eclipse .classpath is missing the runtime libs for the solr component.
Added the missing libs so OFBiz can be started with the solr component out of Eclipse.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704027 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 13:38:38 +00:00
Michael Brohl abd6351c67 Applied patch for OFBIZ-6630: Update ShoppingCartItem locale if ShoppingCart locale is changed.
Introduces the setLocale methode for ShoppingCartItem and sets the locale for every item if the ShoppingCart setLocale method is called.

Thanks Martin Becker for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704018 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 13:16:53 +00:00
Arun Patidar 8a0af90c0f [OFBIZ-6212] Fixed the issue #1 of Accounting reports due to a minor typo and missing screen.Added a decorator screen for using with accounting report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704014 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 13:09:40 +00:00
Michael Brohl 52acfdedc9 Applied patch for OFBIZ-6526: ordermgr/control/searchorders findOrders service returns incorrect orderCount and therefore viewSize.
This patch replaces the HashSet with LinkedHashSet for fieldsToSelect because otherwise statusId was being added to the front of the set which was then passed to count distinct query causing incorrect counts. LinkedHashSet preserves the order in which items are added so orderId always appears at the front of the set for the count distinct query.

Thanks Christian Carlow for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704005 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 12:46:48 +00:00
Michael Brohl 00904e8b4a Applied patch for OFBIZ-6631: Optimize ShoppingCart.removeCartItem (skip price calc and inventory check).
Thanks Martin Becker for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1704000 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 12:31:08 +00:00
Mridul Pathak 16516b6897 [OFBIZ-6091] Supplier preferred currency not considered for drop-ship order. Applying patch from OFBIZ-6091. Thanks Akash Jain for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703988 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 11:34:41 +00:00
Arun Patidar a4bff492a1 [OFBIZ-5970] Removed unused form as discussed on ticket. Thanks Pierre for reporting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703987 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 11:30:53 +00:00
Arun Patidar 832c5ec143 [OFBIZ-5927] Applied the changes as discussed on ticket. Thanks Jacques and Scott for concluding it and thanks to Prateek for reporting this bug.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703981 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 11:08:32 +00:00
Michael Brohl f0b8e2fc5a Applied patch for OFBIZ-6629: Duplicate calculation and typo in ShoppingCart.getGrandTotal().
This removes duplicate code, fixes a methode name typo and adds type safety to an iterator.

Thanks Martin Becker for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703977 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 10:45:13 +00:00
Arun Patidar abd8fbdd37 [OFBIZ-6348] Applied patch attached by Christian on the ticket. Reported issue of row alignment has been fixed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703976 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 10:30:02 +00:00
Arun Patidar 4a1aa950d2 [OFBIZ-6499] Added z-index value with dialog class to fix the issue of lookup in theme.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703971 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 10:08:47 +00:00
Divesh Dutta a35364bc07 [OFBIZ-6438] Fixed issue: PartyGeoLocation shows menus when accessed. Thanks Pravin for your patch and thanks Pierre for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703969 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 09:32:32 +00:00
Michael Brohl b9816d1d5d Applied patch for OFBIZ-6594: Wrong Documentation for Temporal Expressions.
The integer value representing the HOUR was wrong in the documentation.

Thanks Mirco Vogelsmeier for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703965 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 09:14:48 +00:00
Michael Brohl 82b7386e3d Applied patch for OFBIZ-6621: MapContext.entrySet() slows down when ByteBuffer objects are in the context.
Introduces a private inner class ListSet representing a Set backed by a List instead of the HashSet implementation.

Thanks Gareth Carter for spotting this and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703954 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 08:43:40 +00:00
Arun Patidar 85ccf58a76 [OFBIZ-6460] Fixed the exception due to incorrect use of EntityQuery method. Fixed the Query statement.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703945 13f79535-47bb-0310-9956-ffa450edef68
2015-09-19 06:28:20 +00:00
Jacques Le Roux f98543b1ff A patch from Gaudin Pierre for "error in isValidEan util" https://issues.apache.org/jira/browse/OFBIZ-6624
There is an error in isValidEan util. It should be 12 and not 13 in the methods charAt and calcChecksum  because they start at 0.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703586 13f79535-47bb-0310-9956-ffa450edef68
2015-09-17 12:05:19 +00:00
Jacques Le Roux 32b4877639 A patch from Gareth Carter for "PurgeJob.java does not delete RecurrenceRule because it is still referenced by RecurrenceInfo" https://issues.apache.org/jira/browse/OFBIZ-6619
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1703121 13f79535-47bb-0310-9956-ffa450edef68
2015-09-15 08:34:41 +00:00
Jacques Le Roux 21cc20af6a No functional changes, since I put the 2 conditions in the error message at r1702704 no needs to put 2 <check-errors/>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1702708 13f79535-47bb-0310-9956-ffa450edef68
2015-09-13 08:42:42 +00:00
Jacques Le Roux 8acd28ce46 A patch for "createQuoteRole, createContentRole, and createRequirementRole allow for adding Roles to a Party without permissions" https://issues.apache.org/jira/browse/OFBIZ-6605
Rerported by Forrest Rae:
The following functions automatically add a PartyRole entry if the PartyRole does not exist.  This is possible even when the userLogin doesn't have PARTYMGR_UPDATE or PARTYMGR_CREATE.

createQuoteRole
createContentRole
createRequirementRole

Repo:
1) Remove PARTYMGR_UPDATE or PARTYMGR_CREATE permissions from the ORDERENTRY group.
2) Login as DemoRepStore
3) Create a Quote
4) Add a QuoteRole with partyId of DemoRepStore and Role of your choosing.
5) View DemoRepStore roles.

This is a security problem for anyone building component that leverages Role based security.

jleroux: simple solution, check before creating the new role the user has  PARTYMGR_UPDATE or PARTYMGR_CREATE.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1702704 13f79535-47bb-0310-9956-ffa450edef68
2015-09-13 08:31:55 +00:00