Exception with access check for cabinets containing NON-ASCII chars
With a user with access permissions defined opening/searching cabinets with names containing NON-ASCII chars (german umlauts) raises the following traceback. This doesn't happen with admin.
common.middleware.error_logging <645> [ERROR] "process_exception() line 17 Exception caught by request middleware; <WSGIRequest: GET '/cabinets/14/'>, 'ascii' codec can't decode byte 0xc3 in position 64: ordinal not in range(128)"
Traceback (most recent call last):
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/mixins.py", line 345, in dispatch
).dispatch(request, *args, **kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/mixins.py", line 237, in dispatch
return super(ObjectListPermissionFilterMixin, self).dispatch(request, *args,
**kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/mixins.py", line 310, in dispatch
).dispatch(request, *args, **kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
return handler(request, *args, **kwargs)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/views/generic/list.py", line 175, in get
context = self.get_context_data()
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/cabinets/views.py", line 119, in get_context_data
request=self.request, dict_={'object': cabinet}
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/navigation/classes.py", line 364, in resolve
obj=resolved_object, related=self.permissions_related
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/acls/managers.py", line 64, in check_access
permissions=permissions, user=user
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/acls/managers.py", line 57, in check_access
raise PermissionDenied(_('Insufficient access for: %s') % obj)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/utils/functional.py", line 162, in mod
return six.text_type(self) % rhs
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 64: ordinal not in range(128)