"Hide system orders from non-superusers in OrdersTable based on user permissions; update visibility logic to enhance access control."

This commit is contained in:
Jeppe Bundgaard
2025-11-27 10:30:56 +01:00
parent 8110bff6db
commit 2ce314590e
@@ -626,6 +626,9 @@ watch(() => props.orders, () => {
}, { immediate: true });
const isObjectVisible = (object) => {
if (!SessionUser.canAccessSuperUser() && isSystemOrder(object)) {
return false; // Hide system orders for non-superusers
}
// Check if the object is visible based on the showOnlyWithIds prop
if (props.showOnlyWithIds.length === 0 && !props.excludedOrderIds.includes(object.id)) {
return true; // If no filter is applied, show all objects