You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding Policies, the operators used in the BPN Group validation do not seem to match to their desired behaviour.
For the opertator isAllOf, if a BPN is assigned to groups A, B and C and a Policy is created allowing access to A and B the validation will fail and it shouldn't since the assigned groups are all present in the Policy constraint.
For the operator isPartOf, the validation is done considering that all assigned groups for a BPNL are contained in the Policy constraint. It should validate if any of the allowed groups in the Policy are present in the ones assigned to the BPNL, similar to isAnyOf.
To Reproduce
Add a testing BPNL to 3 dummy groups and create a Policy with isAllOf for 2 of the groups to which BPNL is assigned, create a Contract Definition and fetch the catalog.
Expected behavior
Dividing the expected behaviour per incorrect operator:
isAllOf
The validation should be done of assigned groups in the BPNL include all allowed in the Policy.
isPartOf
Instead of being the same validation of isAllOf, should be the same as isAnyOf.
Regarding the equals (eq) and not equals (neq) operators these seem to not make much sense here. They appear to not add needed (additional) validation since the isAllOf, isAnyOf and isNoneOf should cover all the possibilities eq and neq provide. So, here is added the suggestion to remove these two from the BPN group validation (not removed for comparison equality of BPNL's when groups are not considered).
make the IN (isPartOf) operator to call the evaluateIsAnyOf() instead;
create a method for isAllOf (named evaluateIsAllOf()) responsible for the ensuring all the Policy allowed groups are included in the BPNL assigned ones (and not the other way around);
Describe the bug
Regarding Policies, the operators used in the BPN Group validation do not seem to match to their desired behaviour.
isAllOf
, if a BPN is assigned to groups A, B and C and a Policy is created allowing access to A and B the validation will fail and it shouldn't since the assigned groups are all present in the Policy constraint.isPartOf
, the validation is done considering that all assigned groups for a BPNL are contained in the Policy constraint. It should validate if any of the allowed groups in the Policy are present in the ones assigned to the BPNL, similar toisAnyOf
.To Reproduce
Add a testing BPNL to 3 dummy groups and create a Policy with
isAllOf
for 2 of the groups to which BPNL is assigned, create a Contract Definition and fetch the catalog.Expected behavior
Dividing the expected behaviour per incorrect operator:
isAllOf
The validation should be done of assigned groups in the BPNL include all allowed in the Policy.
isPartOf
Instead of being the same validation of
isAllOf
, should be the same asisAnyOf
.Regarding the equals (
eq
) and not equals (neq
) operators these seem to not make much sense here. They appear to not add needed (additional) validation since theisAllOf
,isAnyOf
andisNoneOf
should cover all the possibilitieseq
andneq
provide. So, here is added the suggestion to remove these two from the BPN group validation (not removed for comparison equality of BPNL's when groups are not considered).Possible Implementation
Proposed solution would be updating the BusinessPartnerGroupFunction by:
eq
andneq
as available operators;isPartOf
) operator to call theevaluateIsAnyOf()
instead;isAllOf
(namedevaluateIsAllOf()
) responsible for the ensuring all the Policy allowed groups are included in the BPNL assigned ones (and not the other way around);The text was updated successfully, but these errors were encountered: