diff --git a/product/ERP5SyncML/Subscription.py b/product/ERP5SyncML/Subscription.py index 7e46994ddd922a3086b4dfa45f54542839be85f9..4b7d7bf91211bc089886537fe62fa30eb9c3cda5 100755 --- a/product/ERP5SyncML/Subscription.py +++ b/product/ERP5SyncML/Subscription.py @@ -942,6 +942,8 @@ class Subscription(SyncCode, Implicit, Folder): """ add a Signature to the subscription """ + if signature.getGid() in self.objectIds(): + self._delObject(signature.getGid()) self._setObject( signature.getGid(), signature ) def delSignature(self, gid): diff --git a/product/ERP5SyncML/SynchronizationTool.py b/product/ERP5SyncML/SynchronizationTool.py index fc1a51248876e3cdda4f4ce5aa6f9abed18ae8d7..eea00b21ce8f876962ef63380c44cedb232a4553 100755 --- a/product/ERP5SyncML/SynchronizationTool.py +++ b/product/ERP5SyncML/SynchronizationTool.py @@ -273,6 +273,15 @@ class SynchronizationTool( SubscriptionSynchronization, PublicationSynchronizati if RESPONSE is not None: RESPONSE.redirect('manageSubscriptions') + security.declareProtected(Permissions.ModifyPortalContent, 'manage_syncSubscription') + def manage_syncSubscription(self, title, RESPONSE=None): + """ + reset a subscription + """ + self.SubSync(title) + if RESPONSE is not None: + RESPONSE.redirect('manageSubscriptions') + security.declareProtected(Permissions.AccessContentsInformation,'getPublicationList') def getPublicationList(self): """