Skip to main content

How Multiple Conditions Work Together

Within a Single Permission

When multiple conditions are set within a single permission:

  1. Combined Logic: All conditions must be satisfied for the permission to apply. This means:

    • If a permission has conditions for both suppliers and countries, a user must have access to both the specified suppliers AND the specified countries
    • If any condition is not met, the entire permission is not applicable
  2. Condition Types Interaction:

    • If any condition is set to "All", it automatically includes everything in that category
    • If a condition uses "Include", only the specifically listed items are allowed
    • If a condition uses "Exclude", everything is allowed except the specifically listed items

How They Work Across Multiple Permissions

When a user has multiple permissions:

  1. Union of Permissions: The system combines all applicable permissions to determine the total access:

    • If one permission allows access to Supplier A and another allows access to Supplier B, the user has access to both suppliers
    • The same applies to countries, categories, and other condition types
  2. Precedence Rules:

    • "Include" conditions are additive - they add to the total set of allowed items
    • "Exclude" conditions are subtractive - they remove items from the allowed set
    • "All" conditions override specific includes/excludes for that category

Examples

Example 1: Single Permission with Multiple Conditions

Permission A:
- Suppliers: Include [Supplier1, Supplier2]
- Countries: Include [US, UK]

This permission would only apply to:

  • Products from Supplier1 or Supplier2
  • In the US or UK

Example 2: Multiple Permissions

Permission A:
- Suppliers: Include [Supplier1]
- Countries: Include [US]

Permission B:
- Suppliers: Include [Supplier2]
- Countries: Include [UK]

The user would have access to:

  • Products from both Supplier1 and Supplier2
  • In both US and UK

Example 3: Mixed Condition Types

Permission A:
- Suppliers: All
- Countries: Exclude [US]

This permission would apply to:

  • All suppliers
  • All countries except US

Important Notes

  1. Default Behavior: If a condition is not specified in a permission, it defaults to "All" for suppliers and categories, meaning it applies to everything in those categories.

  2. Empty Conditions: If a permission has no conditions specified, it is considered to have "All" conditions, meaning it applies to everything.

  3. User Assignment: Permissions can be assigned to specific users or user groups, and the conditions only apply to those assigned users.

  4. Enabled Status: Permissions must be enabled to take effect. Disabled permissions are ignored by the system.