Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0054184Openbravo ERPA. Platformpublic2023-12-21 09:472023-12-21 09:48
mtaal 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
Core
No
0054184: CORE2: useEnabledUserAction should return default not-defined user-action when user-action not linked to Role
See the code below [1] to get a user action. If the user's role does not have this user action linked to it then the useEnabledUserAction returns something which is not a function. This gives a low level (see attached).


const switchToGrouped = useEnabledUserAction(
    'SwitchCurrentWindow_OBSSMS_GroupedTasksWindow'
  );

Add the above code somewhere in pos2, run pos2 to check and see that the useraction is not a function.
Return a default useraction which shows a correct message to the user, something like:
User action xxx not defined for this role.
No tags attached.
png t-not-defined.png (16,907) 2023-12-21 09:48
https://issues.openbravo.com/file_download.php?file_id=19245&type=bug
png
Issue History
2023-12-21 09:47mtaalNew Issue
2023-12-21 09:47mtaalAssigned To => Triage Platform Base
2023-12-21 09:47mtaalModules => Core
2023-12-21 09:47mtaalTriggers an Emergency Pack => No
2023-12-21 09:48mtaalFile Added: t-not-defined.png

There are no notes attached to this issue.