Enhancement
Critical
Major
Detail
Detail
Detail
#26156
CommandApprovalService: Declared exceptions do not take effect.
If a rule is configured to prohibit all delete commands in a certain object state, for example, except for a special command, this can be declared as an ''excluded context''.
In the executability check of the command: ''CommandDispatcher::resolveExecutableState(...) --> CommandApprovalService::isExecutable(...) ''for this command the executability is then also calculated correctly (executable, while other delete commands would not be executable). Here also the return value of the command release - rule in the tooltip of disabled commands is output.
However, this is followed by the authorization check of the component: BoundComponent::uncachedAllow(...) --> CommandApprovalService::canExecute(...) Here only the command group (no longer the ID) of the command is taken into account, which is sufficient for an authorization check, but not for the status-dependent command release: Therefore the command is disabled. At this point, the return value of the command release rule is also not evaluated - "No authorization" is always output as the reason in the tooltip. This query of the CommandApprovalService in uncachedAllow() is actually for visibility control of components via the CommandApprovalService. The effect on command executability is an undesirable side effect.
Test
- /com.top_logic.demo/src/test/com/top_logic/demo/scripted/layout/executability/TestCommandApprovalService.script.xml