MPDL / KEEPER

This repository contains files for the KEEPER development
http://keeper.mpdl.mpg.de
7 stars 0 forks source link

Cannot login in seafile client after migration to seafile pro 7.1.3 #420

Closed vmakarenko closed 3 years ago

vmakarenko commented 4 years ago

Found a regression for institution middleware: Setup as described in https://download.seafile.com/published/seafile-manual/deploy_pro/multi_institutions.md seahub_settings.py related settings are: MULTI_INSTITUTION = True EXTRA_MIDDLEWARE_CLASSES = (
'seahub.institutions.middleware.InstitutionMiddleware', 'shibboleth.middleware.ShibbolethRemoteUserMiddleware',
'seahub_extra.organizations.middleware.RedirectMiddleware', )

With the settings Seafile Client (7.0.6, Ubuntu) cannot login anymore:

"Failed to login: Internal Server Error"

seahub_django_request.log: 2020-06-09 11:25:16,288 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/account/info/ Traceback (most recent call last):
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/core/handlers/exception.py", line 41, in inner response = get_response(request)
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, callback_kwargs) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, *kwargs)
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/django/views/generic/base.py", line 68, in view
return self.dispatch(request,
args,
kwargs)
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/seahub/api2/base.py", line 23, in dispatch
response = super(APIView, self).dispatch(*a, *kw) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/rest_framework/views.py", line 505, in dispatch
response = self.handle_exception(exc)
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/seahub/api2/base.py", line 20, in handle_exception
return super(APIView, self).handle_exception(exc) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/rest_framework/views.py", line 465, in handle_exception self.raise_uncaught_exception(exc)
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/rest_framework/views.py", line 476, in raise_uncaught_exception raise exc
File "/opt/seafile/seafile-pro-server-7.1.3/seahub/thirdpart/rest_framework/views.py", line 502, in dispatch response = handler(request,
args, **kwargs) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/seahub/api2/views.py", line 347, in get
return Response(self._get_account_info(request)) File "/opt/seafile/seafile-pro-server-7.1.3/seahub/seahub/api2/views.py", line 338, in _get_account_info info['is_inst_admin'] = request.user.inst_admin AttributeError: 'User' object has no attribute 'inst_admin'

Could you please check the issue and provide an appropriate solution.

Related ticket in Seafile Forum: https://forum.seafile.com/t/7-0-10-ios-client-error-attributeerror-user-object-has-no-attribute-inst-admin/10325

vmakarenko commented 4 years ago

communicated and accepted by seafile, to be fixed in the next seafile release

vmakarenko commented 4 years ago

Estimate possible by-side effects of the fix in order to avoid regressions for KEEPER Release 2.1.

vmakarenko commented 4 years ago

fix is tested: no by side effects are observed