Files
ofbiz-framework/applications/content/data/BlogData.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

70 lines
8.1 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>
<EnumerationType enumTypeId="CONTENT_PRIVILEGE" description="Content Privilege"/>
<Enumeration enumId="CNT_PRV_NA_" enumTypeId="CONTENT_PRIVILEGE" enumCode="_NA_" sequenceId="00" description="Not Applicable"/>
<Enumeration enumId="CNT_PRV_BRONZE" enumTypeId="CONTENT_PRIVILEGE" enumCode="BRONZE" sequenceId="10" description="Bronze Level"/>
<Enumeration enumId="CNT_PRV_SILVER" enumTypeId="CONTENT_PRIVILEGE" enumCode="SILVER" sequenceId="20" description="Silver Level"/>
<Enumeration enumId="CNT_PRV_GOLD" enumTypeId="CONTENT_PRIVILEGE" enumCode="GOLD" sequenceId="30" description="Gold Level"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_CREATE" roleTypeId="CONTENT_AUTHOR" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_CREATE" roleTypeId="CONTENT_AUTHOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_CREATE" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_PUBLISH" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_PUBLISH" roleTypeId="CONTENT_PUBLISHER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_PUBLISH" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_PUBLISH_SELF" roleTypeId="CONTENT_AUTHOR" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_RESPOND" roleTypeId="CONTENT_USER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_UPDATE" roleTypeId="CONTENT_AUTHOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_UPDATE" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_UPDATE" roleTypeId="OWNER" statusId="CTNT_INITIAL_DRAFT" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_VIEW" roleTypeId="CONTENT_AUTHOR" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_VIEW" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_VIEW" roleTypeId="CONTENT_ADMIN" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_VIEW" roleTypeId="CONTENT_USER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_VIEW" roleTypeId="OWNER" statusId="CTNT_INITIAL_DRAFT" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_CREATE" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_PUBLISH" roleTypeId="CONTENT_PUBLISHER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_PUBLISH" roleTypeId="CONTENT_USER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_RESPOND" roleTypeId="CONTENT_USER" statusId="CTNT_PUBLISHED" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_UPDATE" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_UPDATE" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="_NA_" roleTypeId="CONTENT_ADMIN" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="USER" contentOperationId="CONTENT_UPDATE" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_OWNER_ROLE" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_USER_ROLE" roleTypeId="CONTENT_USER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_AUTHOR_ROLE" roleTypeId="CONTENT_AUTHOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_EDITOR_ROLE" roleTypeId="CONTENT_EDITOR" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_ADMIN_ROLE" roleTypeId="CONTENT_ADMIN" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="HAS_PUBLISHER_ROLE" roleTypeId="CONTENT_PUBLISHER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_CREATE_SUB" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_PUBLISH" roleTypeId="CONTENT_PUBLISHER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_LINK_TO" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_LINK_FROM" roleTypeId="OWNER" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_LINK_TO" roleTypeId="CONTENT_ADMIN" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="_NA_" contentOperationId="CONTENT_LINK_FROM" roleTypeId="CONTENT_ADMIN" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_LINK_TO" roleTypeId="_NA_" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_LINK_TO" roleTypeId="_NA_" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="RESPONSE" contentOperationId="CONTENT_LINK_FROM" roleTypeId="_NA_" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
<ContentPurposeOperation contentPurposeTypeId="ARTICLE" contentOperationId="CONTENT_LINK_FROM" roleTypeId="_NA_" statusId="_NA_" privilegeEnumId="CNT_PRV_NA_"/>
</entity-engine-xml>