svn commit: r890311 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r890311 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java

jleroux@apache.org
Author: jleroux
Date: Mon Dec 14 13:30:03 2009
New Revision: 890311

URL: http://svn.apache.org/viewvc?rev=890311&view=rev
Log:
Typo, but this commit is rather a warning: if you put an underscore in your permission it will be stripped by the lines just below this change, ie

    // 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('_'));
        }
    }
So if you put MY_APP as a permission it will end as MY (I will add a comment at http://cwiki.apache.org/confluence/display/OFBTECH/OFBiz+security)

Also because the comment and the code are not consistent I wonder what those lines are really for...
This is from pre Apache Era. I prefer to not touch...

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java?rev=890311&r1=890310&r2=890311&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/component/ComponentConfig.java Mon Dec 14 13:30:03 2009
@@ -711,7 +711,7 @@
                 this.basePermission = new String[] { "NONE" };
             }
 
-            // trim the permussions (remove spaces)
+            // 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) {