Extend access control management (#1493)

* Fix ACM related executions.

* Introduce access controller for actions. Resolve some todos and fix distribution set invalidation strategy.

* Do only check for access if returned values are access controlled.

* Fix review findings.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.com>

---------

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.com>
This commit is contained in:
Michael Herdt
2023-12-01 07:50:41 +01:00
committed by GitHub
parent a6fa75697f
commit 960ab6872d
16 changed files with 332 additions and 258 deletions

View File

@@ -134,14 +134,13 @@ public class AddRolloutWindowLayout extends AbstractRolloutWindowLayout {
}
private Long getTotalTargets(final String filterQuery, final Long distSetTypeId) {
// TODO AC - Check for updatable targets only
if (StringUtils.isEmpty(filterQuery)) {
return null;
}
if (distSetTypeId == null) {
return targetManagement.countByRsql(filterQuery);
return targetManagement.countByRsqlAndUpdatable(filterQuery);
}
return targetManagement.countByRsqlAndCompatible(filterQuery, distSetTypeId);
return targetManagement.countByRsqlAndCompatibleAndUpdatable(filterQuery, distSetTypeId);
}
private boolean isSimpleGroupsTabSelected() {