Commit 97fde169 authored by Claudia Carballo Gonzalez's avatar Claudia Carballo Gonzalez
Browse files

Adding some comments to improve the logic in visibility_control_core.py

parent 0dff91c8
Loading
Loading
Loading
Loading
+3 −1
Changes for services/helper/helper_service/services/visibility_control/core/visibility_control_core.py: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -297,7 +297,9 @@ def get_discoverable_apis(api_invoker_id, all_apis):
        # No rules = default ALLOW (all APIs visible)
        return all_apis

    # Note: The rule can have ALLOW or DENY as default access. The point is to check the exceptions for the final decision (filtered APIs)
    # Note_CCG: The rule can have ALLOW or DENY as default access. 
    # The point is to check the exceptions for the final decision (filtered APIs)
    #To be checked, but I think we don´t need this part ´has_allow_rules´
    has_allow_rules = any(
        rule.get('default_access', rule.get('defaultAccess', 'ALLOW')) == 'ALLOW'
        for rule in active_rules