"Hide system orders from non-superusers in OrdersTable based on user permissions; update visibility logic to enhance access control."
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user