This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git. from b8f67d2 Fixed: Quote and Invoice with null value on refresh base (OFBIZ-12239) new fb0701b Fixed: Plugin not showing in menu due to permission (OFBIZ-12233) new 2ebbc51 Improved: trivial changes in build.gradle and checkstyle.xml The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: build.gradle | 2 +- config/checkstyle/checkstyle.xml | 7 +++++-- .../main/java/org/apache/ofbiz/base/component/ComponentConfig.java | 6 ++---- 3 files changed, 8 insertions(+), 7 deletions(-) |
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit fb0701b7bdf0e5c0e75f51237e2ee85689413b51 Author: Jacques Le Roux <[hidden email]> AuthorDate: Mon May 17 11:56:00 2021 +0200 Fixed: Plugin not showing in menu due to permission (OFBIZ-12233) When creating a plugin via gradle : ./gradlew createPlugin -PpluginId=plugin-test -PpluginResourceName=PluginTest -PwebappName=plugin-test -PbasePermission=PLUGIN_TEST and loading all the required data and permissions, the plugin doesn't appear in the menu. It comes from the ComponentConfig.java file, L1229, when the permissions gets trimmed and modified. I tried removing it locally and it fixed the problem. Thanks: Gaetan Chaboussie --- .../main/java/org/apache/ofbiz/base/component/ComponentConfig.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java b/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java index a8cd26b..f6cbc4c 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/component/ComponentConfig.java @@ -42,6 +42,7 @@ import org.apache.ofbiz.base.util.Assert; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.Digraph; import org.apache.ofbiz.base.util.KeyStoreUtil; +import org.apache.ofbiz.base.util.StringUtil; import org.apache.ofbiz.base.util.UtilURL; import org.apache.ofbiz.base.util.UtilValidate; import org.apache.ofbiz.base.util.UtilXml; @@ -1225,10 +1226,7 @@ public final class ComponentConfig { } // trim the permissions (remove spaces) for (int i = 0; i < this.basePermission.length; i++) { - this.basePermission[i] = this.basePermission[i].trim(); - if (this.basePermission[i].indexOf('_') != -1) { - this.basePermission[i] = this.basePermission[i].substring(0, this.basePermission[i].indexOf('_')); - } + this.basePermission[i] = StringUtil.removeSpaces(this.basePermission[i]); } String menuNameStr = element.getAttribute("menu-name"); if (UtilValidate.isNotEmpty(menuNameStr)) { |
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 2ebbc51afd92b185a0be104380ebb6543bdc5810 Author: Jacques Le Roux <[hidden email]> AuthorDate: Mon May 17 11:57:59 2021 +0200 Improved: trivial changes in build.gradle and checkstyle.xml --- build.gradle | 2 +- config/checkstyle/checkstyle.xml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 840ed8b..f02e520 100644 --- a/build.gradle +++ b/build.gradle @@ -334,7 +334,7 @@ checkstyle { // ‘checkstyle’ tool present in the framework and in the official // plugins. tasks.checkstyleMain.maxErrors = 116 - // Currently there are a lot of errors so we need to temporarily + // Currently there are still errors so we need to temporarily // hide them to avoid polluting the terminal output. showViolations = false } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index ebd2440..9bb4278 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -22,7 +22,10 @@ under the License. "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> <!-- This configuration corresponds to the OFBiz coding conventions - which are simply “Sun Coding Standards” + “150 characters line length” --> + which are basically “Sun Coding Standards” + + 150 characters line length + + NewlineAtEndOfFile value="lf_cr_crlf" /> + --> <module name="Checker"> <module name="BeforeExecutionExclusionFileFilter"> <property name="fileNamePattern" value="module\-info\.java$"/> @@ -31,7 +34,7 @@ under the License. <!-- General file conventions --> <module name="NewlineAtEndOfFile"> - <property name="lineSeparator" value="lf" /> + <property name="lineSeparator" value="lf_cr_crlf" /> </module> <module name="FileTabCharacter"/> <module name="RegexpSingleline"> |
Free forum by Nabble | Edit this page |