Commit 0b9ecdd7 authored by Arnaud Fontaine's avatar Arnaud Fontaine

py3: AccessControl users_with_local_roles() returns a dict_keys() instead of a list().

This should probably be fixed upstream.
parent 631f9063
......@@ -104,6 +104,8 @@ import zope.interface
from ZODB.POSException import ConflictError
from zLOG import LOG, INFO, ERROR, WARNING
import six
_MARKER = []
class PersistentContainer(Persistent):
......@@ -1887,6 +1889,9 @@ class Base(
if 'Owner' in rolesForPermissionOn(Permissions.View, self):
owner_list = self.users_with_local_role('Owner')
if owner_list:
if six.PY3:
# keys() returns a dict_keys not supporting Indexing
owner_list = list(owner_list)
return owner_list[0]
# Private accessors for the implementation of relations based on
......
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