Hello
I'm referring to the Q359904.
My question is concerning the behavior of the method directBaseUow_BeforeCommitTransaction of MySecuredObjectSpaceProvider when only the PayCard object is allowed (the PayCardUsage is not accessible).
Can you confirm that, despite we are operating within a non secured session, when you are saving an instance of the PayCard object then the result calculated by the CalculatePayMoneyAmount will not include the values of the PayCardUsage that are denied by the the TypePermission?
The above is what appears to be to me when we configure the above permissions, the PaycardUsages collection owned by the PayCard always contains 0 elements even from within the directBaseUow_BeforeCommitTransaction method.
BTW: I modified the original example just changing the permissions for the user role. Please execute the example, modify the current PayCard object and save. You will see that the property PayMoneyAmount will be zero instead of the sum of PayCardUsage objects. In this case is seems there is a Criteria "1==0" set on the PayCardUsages property of the Paycard object that do not allows to the get right collection.
Infact, querying directly the PayCardUsage records is possible (this confirm that we are within a non Secure session) but is seems to the that the Criteria 1==0 was created (and not removed) by the SecuritySystem. Do you confirm that this criteria created by the securitySystem? Any way to detect and remove it?
Can you suggest a way of keeping the suggested method (directBaseUow_BeforeCommitTransaction) but be sure that the PayMoneyAmount property of the PayCard object will for sure be updated with the right Sum regardless the permissions set on the PayCardUsage object?
Many thanks for your support.
D