enhancement
critical
major
minor
minor
minor
#26156
CommandApprovalService: Declared exceptions do not take effect.
If a rule is configured to prohibit all delete commands in a specific object state—for example, with the exception of a specific command—that command can be declared as an "excluded context."
In the command’s executability check: ''CommandDispatcher::resolveExecutableState(...) --> CommandApprovalService::isExecutable(...) ''the executability of this command is then correctly determined (executable, while other delete commands would not be executable). The return value of the command approval rule is also displayed in the tooltip of disabled commands.
However, this is followed by the component’s permission check: BoundComponent::uncachedAllow(...) --> CommandApprovalService::canExecute(...) Here, only the command group (not the ID) of the command is taken into account, which is sufficient for a permission check but not for status-dependent command approval: Therefore, the command is disabled. At this point, the return value of the command approval rule is also not evaluated—the tooltip always displays “No permission” as the reason. This query of the CommandApprovalService in uncachedAllow() is actually intended to control the visibility of components via the CommandApprovalService. The impact on the executability of commands is an unintended side effect.
Test
- /com.top_logic.demo/src/test/com/top_logic/demo/scripted/layout/executability/TestCommandApprovalService.script.xml