Skip to content

Refactor AuthorizationFilter::hasAnyPermission to avoid always returning true

Xiangliang Meng requested to merge DavidMeng-master-patch-92375 into master

Type of change

  • Bug Fix
  • Feature

Please provide link to gitlab issue or ADR(Architecture Decision Record)
It is a problem found by sonarQube that the method AuthorizationFilter::hasAnyPermission always return true from all its branches

Does this introduce a change in the core logic?

  • [YES]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Does this introduce a breaking change?

  • [NO]

What is the current behavior?

The method AuthorizationFilter::hasAnyPermission always return true from all its branches

What is the new/expected behavior?

The method AuthorizationFilter::hasAnyPermission might return false in some situation.

Have you added/updated Unit Tests and Integration Tests?

No.

Any other useful information

Edited by Okoun-Ola Fabien Houeto

Merge request reports