Commit 703791a9 authored by Gabriel Monnerat's avatar Gabriel Monnerat

add steps to validate if a software instance user has access to view a sale...

add steps to validate if a software instance user has access to view a sale order that is associated with one slave instance
parent 8fcf4862
...@@ -4852,11 +4852,13 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -4852,11 +4852,13 @@ class TestVifibSlapWebService(testVifibMixin):
ConfirmOrderedSaleOrderActiveSense ConfirmOrderedSaleOrderActiveSense
Tic Tic
StoreSalePackingListLineFromSlaveInstance StoreSalePackingListLineFromSlaveInstance
StoreSaleOrderFromSlaveInstance
SlapLoginCurrentComputer SlapLoginCurrentComputer
CheckSlaveInstanceListFromOneComputerPartition CheckSlaveInstanceListFromOneComputerPartition
SlapLoginSoftwareInstanceFromCurrentSoftwareInstance SlapLoginSoftwareInstanceFromCurrentSoftwareInstance
CheckSlaveInstanceAccessUsingCurrentSoftwareInstanceUser CheckSlaveInstanceAccessUsingCurrentSoftwareInstanceUser
CheckSalePackingListFromSlaveInstanceAccessUsingSoftwareInstanceUser CheckSalePackingListFromSlaveInstanceAccessUsingSoftwareInstanceUser
CheckSaleOrderFromSlaveInstanceAccessUsingSoftwareInstanceUser
CheckHostingSubscriptionFromSlaveInstanceAccessUsingSoftwareInstanceUser CheckHostingSubscriptionFromSlaveInstanceAccessUsingSoftwareInstanceUser
SlapLogout SlapLogout
""" """
...@@ -6007,6 +6009,16 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -6007,6 +6009,16 @@ class TestVifibSlapWebService(testVifibMixin):
self.assertUserCanViewDocument(username, sale_packing_list_line) self.assertUserCanViewDocument(username, sale_packing_list_line)
self.failIfUserCanModifyDocument(username, sale_packing_list_line) self.failIfUserCanModifyDocument(username, sale_packing_list_line)
def stepCheckSaleOrderFromSlaveInstanceAccessUsingSoftwareInstanceUser(self,
sequence):
portal_membership = self.portal.portal_membership
sale_order = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order",
uid=sequence["sale_order_uid"])
username = portal_membership.getAuthenticatedMember().getUserName()
self.assertUserCanViewDocument(username, sale_order)
self.failIfUserCanModifyDocument(username, sale_order)
def stepCheckHostingSubscriptionFromSlaveInstanceAccessUsingSoftwareInstanceUser(self, def stepCheckHostingSubscriptionFromSlaveInstanceAccessUsingSoftwareInstanceUser(self,
sequence): sequence):
portal_membership = self.portal.portal_membership portal_membership = self.portal.portal_membership
...@@ -6019,6 +6031,13 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -6019,6 +6031,13 @@ class TestVifibSlapWebService(testVifibMixin):
self.assertUserCanViewDocument(username, hosting_subscription) self.assertUserCanViewDocument(username, hosting_subscription)
self.failIfUserCanModifyDocument(username, hosting_subscription) self.failIfUserCanModifyDocument(username, hosting_subscription)
def stepStoreSaleOrderFromSlaveInstance(self, sequence):
sale_order_line = self.portal.portal_catalog.getResultValue(
portal_type="Sale Order Line",
aggregate_refence=sequence["software_instance_reference"])
sequence.edit(sale_order_line_uid=sale_order_line.getUid(),
sale_order_uid=sale_order_line.getParent().getUid())
def stepStoreSalePackingListLineFromSlaveInstance(self, sequence): def stepStoreSalePackingListLineFromSlaveInstance(self, sequence):
sale_packing_list_line = self.portal.portal_catalog.getResultValue( sale_packing_list_line = self.portal.portal_catalog.getResultValue(
portal_type="Sale Packing List Line", portal_type="Sale Packing List Line",
......
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