Author: hansbak
Date: Fri May 27 08:49:41 2011
New Revision: 1128199
URL:
http://svn.apache.org/viewvc?rev=1128199&view=revLog:
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");