Files
ofbiz-framework/applications/content/data/ForumDemoData.xml
T
Andrew Zeneski f850e8b08c Content Permission & Service Refactoring: A number of big changes to content services including new permission services. This is the first pass with detailed testing on blogs in ecommerce. Tested low level screens as well.
This is the first pass, there are still a number of references to old permission checking, some services need to be refactored, some replaced with better practices. This is a work in progress. 

This first pass includes the removal of special BLOG_ roles and status. Replaced with a generic CONTENT_ and CTNT_. Also adds new ECAs to base createContent service which creates OWNER role as well as associations when passed a contentIdTo or contentIdFrom (and TYPE). This will probably replace the persistContentAndAssoc service which is used in many places. Some have been updated in the revision, others will follow.

Most code which calls the older permission services are found in .java files. Almost all simple methods have been converted to have the permission in the service def and the code removed from the implementation. Java methods still need to be addressed.

The older permission service will output a warning in logs with a stack trace to help track down places where this service is still being called. This is not an error, but may show in logs for the time being.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@509321 13f79535-47bb-0310-9956-ffa450edef68
2007-02-19 19:53:06 +00:00

84 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<entity-engine-xml>
<!-- ForumGroups -->
<Content contentId="WebStoreFORUM" contentTypeId="FORUM_ROOT" contentName="WebStore Forum Root" description="Ecommerce Forums" childBranchCount="3" lastUpdatedStamp="2006-05-03 08:02:52.806" lastUpdatedTxStamp="2006-05-03 08:02:52.248" createdStamp="2006-05-01 13:07:22.886" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentPurpose contentId="WebStoreFORUM" contentPurposeTypeId="ARTICLE"/><!-- do we need this? -->
<ContentPurpose contentId="WebStoreFORUM" contentPurposeTypeId="RESPONSE"/>
<ContentRole contentId="WebStoreFORUM" partyId="BLOG_EDITOR" roleTypeId="CONTENT_EDITOR" fromDate="2004-04-01 12:00:00.000"/>
<ContentRole contentId="WebStoreFORUM" partyId="BLOG_ADMIN" roleTypeId="CONTENT_PUBLISHER" fromDate="2004-04-01 12:00:00.000"/>
<ContentRole contentId="WebStoreFORUM" partyId="BLOG_ADMIN" roleTypeId="CONTENT_EDITOR" fromDate="2004-04-01 12:00:00.000"/>
<ContentRole contentId="WebStoreFORUM" partyId="BLOG_ADMIN" roleTypeId="CONTENT_AUTHOR" fromDate="2004-04-01 12:00:00.000"/>
<ContentRole contentId="WebStoreFORUM" partyId="BLOG_ADMIN" roleTypeId="CONTENT_ADMIN" fromDate="2004-04-01 12:00:00.000"/>
<!-- forums -->
<Content contentId="ASK" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreFORUM" contentName="Ask the Experts" description="Ask the Experts" childBranchCount="0" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-02 20:06:50.782" lastUpdatedTxStamp="2006-05-02 20:06:50.646" createdStamp="2006-05-01 13:07:23.198" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAssoc contentId="ASK" contentIdTo="WebStoreFORUM" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.0" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-01 13:07:23.201" lastUpdatedTxStamp="2006-05-01 13:07:22.778" createdStamp="2006-05-01 13:07:23.201" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAttribute contentId="ASK" attrName="publishOperation" attrValue="HAS_USER_ROLE"/><!-- do we need this? -->
<Content contentId="GIZMOS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreFORUM" statusId="CTNT_PUBLISHED" contentName="Gizmos" description="Gizmos" childBranchCount="3" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-03 08:49:38.728" lastUpdatedTxStamp="2006-05-03 08:49:38.534" createdStamp="2006-05-01 13:07:23.161" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAssoc contentId="GIZMOS" contentIdTo="WebStoreFORUM" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.0" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-01 13:07:23.166" lastUpdatedTxStamp="2006-05-01 13:07:22.778" createdStamp="2006-05-01 13:07:23.166" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAttribute contentId="GIZMOS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
<Content contentId="WIDGETS" contentTypeId="WEB_SITE_PUB_PT" ownerContentId="WebStoreFORUM" statusId="CTNT_IN_PROGRESS" contentName="Widgets" description="Widgets" childBranchCount="0" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-02 20:06:46.214" lastUpdatedTxStamp="2006-05-02 20:06:45.781" createdStamp="2006-05-01 13:07:23.039" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAssoc contentId="WIDGETS" contentIdTo="WebStoreFORUM" contentAssocTypeId="SUBSITE" fromDate="2004-03-01 12:00:00.0" createdDate="2004-03-01 12:00:00.0" createdByUserLogin="admin" lastUpdatedStamp="2006-05-01 13:07:23.126" lastUpdatedTxStamp="2006-05-01 13:07:22.778" createdStamp="2006-05-01 13:07:23.126" createdTxStamp="2006-05-01 13:07:22.778"/>
<ContentAttribute contentId="WIDGETS" attrName="publishOperation" attrValue="HAS_USER_ROLE"/>
<!-- Threads -->
<Content contentId="thread10021" contentTypeId="DOCUMENT" ownerContentId="GIZMOS" dataResourceId="TEMPLATE_TEXT_ONLY" statusId="CTNT_PUBLISHED" contentName="This is a Thread" description="Gizmo useless?" childBranchCount="1" createdDate="2006-05-02 13:36:31.937" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:31.937" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-01 08:49:38.78" lastUpdatedTxStamp="2006-05-01 08:49:38.534" createdStamp="2006-05-01 13:36:31.987" createdTxStamp="2006-05-01 13:36:31.904"/>
<ContentAssoc contentId="thread10021" contentIdTo="GIZMOS" contentAssocTypeId="PUBLISH_LINK" fromDate="2006-05-02 13:36:32.036" createdDate="2006-05-02 13:36:32.055" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.055" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.154" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.154" createdTxStamp="2006-05-02 13:36:31.904"/>
<ContentPurpose contentId="thread10021" contentPurposeTypeId="ARTICLE" lastUpdatedStamp="2006-05-03 11:08:10.788" lastUpdatedTxStamp="2006-05-03 11:08:10.751" createdStamp="2006-05-03 11:08:10.788" createdTxStamp="2006-05-03 11:08:10.751"/>
<!-- Messages -->
<DataResource dataResourceId="msg10002" dataResourceTypeId="ELECTRONIC_TEXT" ownerContentId="GIZMOS" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" createdDate="2006-05-02 13:36:32.264" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.264" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.266" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.266" createdTxStamp="2006-05-02 13:36:31.904"/>
<Content contentId="msg10002" contentTypeId="DOCUMENT" ownerContentId="GIZMOS" dataResourceId="msg10002" statusId="CTNT_PUBLISHED" contentName="This is a message" description="Gizmo useless?" childBranchCount="0" createdDate="2006-05-02 13:36:32.417" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.417" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-01 08:05:42.715" lastUpdatedTxStamp="2006-05-01 08:05:42.438" createdStamp="2006-05-01 13:36:32.429" createdTxStamp="2006-05-01 13:36:31.904"/>
<ContentPurpose contentId="msg10002" contentPurposeTypeId="MAIN_ARTICLE" lastUpdatedStamp="2006-05-03 11:08:11.0" lastUpdatedTxStamp="2006-05-03 11:08:10.914" createdStamp="2006-05-03 11:08:11.0" createdTxStamp="2006-05-03 11:08:10.914"/>
<ContentAssoc contentId="msg10002" contentIdTo="thread10021" contentAssocTypeId="RESPONSE" fromDate="2006-05-02 13:36:32.495" mapKey="ARTICLE" createdDate="2006-05-02 13:36:32.495" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.495" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.537" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.537" createdTxStamp="2006-05-02 13:36:31.904"/>
<ElectronicText dataResourceId="msg10002" lastUpdatedStamp="2006-05-02 13:36:32.351" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.351" createdTxStamp="2006-05-02 13:36:31.904">
<textData><![CDATA[
It is well known that a Gizmo is no use to everybody. However everybody wants it, why is that?
Anybody any sensible thoughts on this? A usual I do not know.
]]></textData>
</ElectronicText>
<!-- Responses -->
<DataResource dataResourceId="msg10002a" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" createdDate="2006-05-02 13:36:32.264" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.264" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.266" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.266" createdTxStamp="2006-05-02 13:36:31.904"/>
<Content contentId="msg10002a" contentTypeId="DOCUMENT" ownerContentId="GIZMOS" dataResourceId="msg10002a" statusId="CTNT_PUBLISHED" contentName="This is a reponse" description="re1:Gizmo useless?" childBranchCount="0" createdDate="2006-05-02 13:36:32.417" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.417" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-03 08:05:42.715" lastUpdatedTxStamp="2006-05-03 08:05:42.438" createdStamp="2006-05-02 13:36:32.429" createdTxStamp="2006-05-02 13:36:31.904"/>
<ContentAssoc contentId="msg10002a" contentIdTo="thread10021" contentAssocTypeId="RESPONSE" fromDate="2006-05-02 13:36:32.495" mapKey="ARTICLE" createdDate="2006-05-02 13:36:32.495" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.495" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.537" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.537" createdTxStamp="2006-05-02 13:36:31.904"/>
<ContentPurpose contentId="msg10002a" contentPurposeTypeId="RESPONSE" lastUpdatedStamp="2006-05-03 11:08:11.0" lastUpdatedTxStamp="2006-05-03 11:08:10.914" createdStamp="2006-05-03 11:08:11.0" createdTxStamp="2006-05-03 11:08:10.914"/>
<ElectronicText dataResourceId="msg10002a" lastUpdatedStamp="2006-05-02 13:36:32.351" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.351" createdTxStamp="2006-05-02 13:36:31.904">
<textData><![CDATA[
A very good question and i am really surprised that you ask the question. Do you live? It is wel known that
people love gizmo's and want to have every day a new one! They showof with them to proove they are better in life
than other people who have less beautifull gizmo's.
]]></textData>
</ElectronicText>
<DataResource dataResourceId="msg10002b" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" createdDate="2006-05-02 13:36:32.264" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.264" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.266" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.266" createdTxStamp="2006-05-02 13:36:31.904"/>
<Content contentId="msg10002b" contentTypeId="DOCUMENT" ownerContentId="GIZMOS" dataResourceId="msg10002b" statusId="CTNT_PUBLISHED" contentName="This is a reponse" description="re2:Gizmo useless?" childBranchCount="0" createdDate="2006-05-02 13:36:32.417" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.417" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-03 08:05:42.715" lastUpdatedTxStamp="2006-05-03 08:05:42.438" createdStamp="2006-05-02 13:36:32.429" createdTxStamp="2006-05-02 13:36:31.904"/>
<ContentAssoc contentId="msg10002b" contentIdTo="thread10021" contentAssocTypeId="RESPONSE" fromDate="2006-05-02 13:36:32.495" mapKey="ARTICLE" createdDate="2006-05-02 13:36:32.495" createdByUserLogin="admin" lastModifiedDate="2006-05-02 13:36:32.495" lastModifiedByUserLogin="admin" lastUpdatedStamp="2006-05-02 13:36:32.537" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.537" createdTxStamp="2006-05-02 13:36:31.904"/>
<ContentPurpose contentId="msg10002b" contentPurposeTypeId="RESPONSE" lastUpdatedStamp="2006-05-03 11:08:11.0" lastUpdatedTxStamp="2006-05-03 11:08:10.914" createdStamp="2006-05-03 11:08:11.0" createdTxStamp="2006-05-03 11:08:10.914"/>
<ElectronicText dataResourceId="msg10002b" lastUpdatedStamp="2006-05-02 13:36:32.351" lastUpdatedTxStamp="2006-05-02 13:36:31.904" createdStamp="2006-05-02 13:36:32.351" createdTxStamp="2006-05-02 13:36:31.904">
<textData><![CDATA[
Why so many people do not know that people love gizmo's? Probably because they do not have one and do not know how
much pleasure it gives?
]]></textData>
</ElectronicText>
</entity-engine-xml>