FIXED : ALF-11400: Publishing - Incorrect behaviour of publishing permissions

Changed to a new publishedNode association


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31944 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2011-11-14 16:41:46 +00:00
parent 3df35a9d06
commit 4c350ca0a0
3 changed files with 14 additions and 3 deletions

View File

@@ -45,6 +45,17 @@
<many>true</many> <many>true</many>
</target> </target>
</child-association> </child-association>
<child-association name="pub:publishedNodes">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:cmobject</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
</associations> </associations>
</type> </type>

View File

@@ -19,7 +19,6 @@
package org.alfresco.repo.publishing; package org.alfresco.repo.publishing;
import static org.alfresco.model.ContentModel.ASSOC_CONTAINS;
import static org.alfresco.repo.publishing.PublishingModel.ASPECT_PUBLISHED; import static org.alfresco.repo.publishing.PublishingModel.ASPECT_PUBLISHED;
import static org.alfresco.repo.publishing.PublishingModel.ASSOC_LAST_PUBLISHING_EVENT; import static org.alfresco.repo.publishing.PublishingModel.ASSOC_LAST_PUBLISHING_EVENT;
import static org.alfresco.repo.publishing.PublishingModel.NAMESPACE; import static org.alfresco.repo.publishing.PublishingModel.NAMESPACE;
@@ -272,7 +271,7 @@ public class ChannelImpl implements Channel
name = GUID.generate(); name = GUID.generate();
} }
QName assocName = QName.createQName(NAMESPACE, name); QName assocName = QName.createQName(NAMESPACE, name);
ChildAssociationRef publishedAssoc = nodeService.createNode(root, ASSOC_CONTAINS, assocName, type, actualProps); ChildAssociationRef publishedAssoc = nodeService.createNode(root, PublishingModel.ASSOC_PUBLISHED_NODES, assocName, type, actualProps);
NodeRef publishedNode = publishedAssoc.getChildRef(); NodeRef publishedNode = publishedAssoc.getChildRef();
return publishedNode; return publishedNode;
} }

View File

@@ -90,6 +90,7 @@ public interface PublishingModel
public static final QName ASSOC_PUBLISHING_EVENT = QName.createQName(NAMESPACE, "publishingEventAssoc"); public static final QName ASSOC_PUBLISHING_EVENT = QName.createQName(NAMESPACE, "publishingEventAssoc");
public static final QName ASSOC_SOURCE = QName.createQName(NAMESPACE, "source"); public static final QName ASSOC_SOURCE = QName.createQName(NAMESPACE, "source");
public static final QName ASSOC_LAST_PUBLISHING_EVENT= QName.createQName(NAMESPACE, "lastPublishingEvent"); public static final QName ASSOC_LAST_PUBLISHING_EVENT= QName.createQName(NAMESPACE, "lastPublishingEvent");
public static final QName ASSOC_PUBLISHED_NODES = QName.createQName(NAMESPACE, "publishedNodes");
// Workflow Properties // Workflow Properties
public static final QName PROP_WF_PUBLISHING_EVENT= QName.createQName(WF_NAMESPACE, "publishingEvent"); public static final QName PROP_WF_PUBLISHING_EVENT= QName.createQName(WF_NAMESPACE, "publishingEvent");