svn commit: r1128199 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

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

svn commit: r1128199 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

hansbak-2
Author: hansbak
Date: Fri May 27 08:49:41 2011
New Revision: 1128199

URL: http://svn.apache.org/viewvc?rev=1128199&view=rev
Log:
increase security on content, set the isPublic flag to 'N' if not provided

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1128199&r1=1128198&r2=1128199&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Fri May 27 08:49:41 2011
@@ -222,6 +222,10 @@ public class ContentManagementServices {
         dataResource.setPKFields(context);
         dataResource.setNonPKFields(context);
         dataResource.setAllFields(context, false, "dr", null);
+        String isPublic = (String) context.get("isPublic");
+        if(UtilValidate.isEmpty(isPublic)){
+            dataResource.set("isPublic", "N");
+        }
         context.putAll(dataResource);
         String dataResourceId = (String) dataResource.get("dataResourceId");
         String dataResourceTypeId = (String) dataResource.get("dataResourceTypeId");