In farmOS 2.x quantities did not have permissions with bundle granularity. This means there was a single permission for creating and viewing quantities of any type eg: create quantity, and two permissions each for updating and deleting own or any quantities eg: update any quantity, update own quantity. This is in conflict with how the farmOS Manged Role entity permissions work, which creates bundle granularity for permissions for all farmOS entity types, including quantities. As a result, it is possible that Managed Roles could be using bundle granularity quantity permissions that do not exist. While this has not caused any errors in 2.x, Drupal 10 has stricter rules that will raise errors if invalid permissions are used.
farmOS 3.x will adopt bundle granularity permissions for quantities. This allows Managed Role entity permissions to work as designed and provides proper support for granular permissions at the quantity type level when necessary. Changes to existing code and roles are only required if any of the non-bundle granularity quantity permissions were being used, and can be updated to their bundle equivalents:
create quantity->create {bundle} quantityupdate any quantity->update any {bundle} quantityupdate own quantity->update own {bundle} quantitydelete any quantity->delete any {bundle} quantitydelete own quantity->delete own {bundle} quantity
An entire list of quantity permissions, before and after:
Before:
[
"administer quantity_type",
"administer quantity",
"create quantity_type",
"create quantity", # Removed
"delete quantity_type",
"delete any quantity", # Removed
"delete own quantity", # Removed
"revert all quantity revisions",
"update quantity_type",
"update any quantity", # Removed
"update own quantity", # Removed
"view quantity_type",
"view all quantity revisions",
"view any quantity",
"view own quantity",
]
After:
[
"administer quantity_type",
"administer quantity",
"create quantity_type",
"delete quantity_type",
"create material quantity", # New
"delete any material quantity", # New
"delete own material quantity", # New
"update any material quantity", # New
"update own material quantity", # New
"view any material quantity", # New
"view own material quantity", # New
"revert all quantity revisions",
"create standard quantity", # New
"delete any standard quantity", # New
"delete own standard quantity", # New
"update any standard quantity", # New
"update own standard quantity", # New
"view any standard quantity", # New
"view own standard quantity", # New
"update quantity_type",
"view quantity_type",
"view all quantity revisions",
"view any quantity",
"view own quantity",
]