Commit 4b0a3bbd authored by Sebastien Robin's avatar Sebastien Robin

fix 2 security settings


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@388 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 01840c37
...@@ -279,7 +279,7 @@ class SynchronizationTool( UniqueObject, SimpleItem, ...@@ -279,7 +279,7 @@ class SynchronizationTool( UniqueObject, SimpleItem,
return None return None
security.declareProtected(Permissions.AccessContentsInformation,'') security.declareProtected(Permissions.AccessContentsInformation,'getSynchronizationList')
def getSynchronizationList(self): def getSynchronizationList(self):
""" """
Returns the list of subscriptions and publications Returns the list of subscriptions and publications
...@@ -287,7 +287,7 @@ class SynchronizationTool( UniqueObject, SimpleItem, ...@@ -287,7 +287,7 @@ class SynchronizationTool( UniqueObject, SimpleItem,
""" """
return self.getSubscriptionList() + self.getPublicationList() return self.getSubscriptionList() + self.getPublicationList()
security.declareProtected(Permissions.AccessContentsInformation,'') security.declareProtected(Permissions.AccessContentsInformation,'getSubscriberList')
def getSubscriberList(self): def getSubscriberList(self):
""" """
Returns the list of subscribers and subscriptions Returns the list of subscribers and subscriptions
...@@ -402,10 +402,11 @@ class SynchronizationTool( UniqueObject, SimpleItem, ...@@ -402,10 +402,11 @@ class SynchronizationTool( UniqueObject, SimpleItem,
object = self.unrestrictedTraverse(conflict.getObjectPath()) object = self.unrestrictedTraverse(conflict.getObjectPath())
subscriber = conflict.getSubscriber() subscriber = conflict.getSubscriber()
# get the signature: # get the signature:
LOG('p_sync.setLocalObject, subscriber: ',0,subscriber) LOG('p_sync.applyPublisherValue, subscriber: ',0,subscriber)
signature = subscriber.getSignature(object.getId()) # XXX may be change for rid signature = subscriber.getSignature(object.getId()) # XXX may be change for rid
signature.delConflict(conflict) signature.delConflict(conflict)
if signature.getConflictList() == []: if signature.getConflictList() == []:
LOG('p_sync.applyPublisherValue, conflict_list empty on : ',0,signature)
signature.setStatus(self.PUB_CONFLICT_MERGE) signature.setStatus(self.PUB_CONFLICT_MERGE)
security.declareProtected(Permissions.ModifyPortalContent, 'applyPublisherDocument') security.declareProtected(Permissions.ModifyPortalContent, 'applyPublisherDocument')
...@@ -414,8 +415,10 @@ class SynchronizationTool( UniqueObject, SimpleItem, ...@@ -414,8 +415,10 @@ class SynchronizationTool( UniqueObject, SimpleItem,
apply the publisher value for all conflict of the given document apply the publisher value for all conflict of the given document
""" """
subscriber = conflict.getSubscriber() subscriber = conflict.getSubscriber()
LOG('applyPublisherDocument, subscriber: ',0,subscriber)
for c in self.getConflictList(conflict.getObjectPath()): for c in self.getConflictList(conflict.getObjectPath()):
if c.getSubscriber() == subscriber: if c.getSubscriber() == subscriber:
LOG('applyPublisherDocument, applying on conflict: ',0,conflict)
c.applyPublisherValue() c.applyPublisherValue()
security.declareProtected(Permissions.ModifyPortalContent, 'applySubscriberDocument') security.declareProtected(Permissions.ModifyPortalContent, 'applySubscriberDocument')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment