Commit 520ff509 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_core: Make Preference_disableOtherPreferences consistent.

Ownership and Owner role are distinct: catalog's "viewable_owner" is
role-based, but "owner" is ownership based. As permissions are applied by
catalog in addition to any given parameter, this should not change the
result of this query. And as any owner which does not have the Owner role
would cause this script to fail on the assertion, this should not change
the result of this script in any way besides avoiding AssertionErrors.
parent 1cb8e3c6
Pipeline #19182 failed with stage
in 0 seconds
......@@ -9,7 +9,7 @@ if context.getPriority() != 3: # XXX 3 is Priority.USER
for preference in portal.portal_preferences.searchFolder(
owner={'query': str(portal.portal_membership.getAuthenticatedMember()), 'key': 'ExactMatch'},
viewable_owner={'query': str(portal.portal_membership.getAuthenticatedMember()), 'key': 'ExactMatch'},
preference = preference.getObject()
assert portal.portal_membership.getAuthenticatedMember().allowed(preference, ['Owner', ]), preference
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment