Closed mikkonie closed 5 months ago
Looks like there are more access control changing shenaningans, at least:
SetAccessTask failed: 'iRODSSession' object has no attribute 'permissions'
Update: documentation says.. "<session>.permissions
was removed in v2.0.0 in favor of <session>.acls
."
Second problem solved: iRODSSession.acls
does not return user objects if permissions are set using groups. Instead, we need to check group permissions manually in such cases.
Third issue: from python-irodsclient==1.1.9
onwards, logging has been changed or is broken. In my tests, I'm receiving a mountain of warnings and errors which are normally suppressed. These happen with expected cases, where e.g. access is supposed to be denied for a view. Example:
test_auth_disabled (irodsbackend.tests.test_views.TestLocalAuthAPIView)
Test auth with existing user and auth check disabled ... ERROR:django.request:Internal Server Error: /irodsbackend/api/auth
ok
test_auth_invalid_password (irodsbackend.tests.test_views.TestLocalAuthAPIView)
Test auth with invalid password ... WARNING:django.request:Unauthorized: /irodsbackend/api/auth
ok
test_auth_invalid_user (irodsbackend.tests.test_views.TestLocalAuthAPIView)
Test auth with invalid user ... WARNING:django.request:Unauthorized: /irodsbackend/api/auth
ok
This also occurs in views which are in no way connected to the python client and don't even initialize . I can't find anything referring such a change in the documentation.
I'll see if there is a way to suppress this redundant logging. If not, I'll contact iRODS support.
The logging issue was fixed by disabling propagate
and setting disable_existing_loggers
True.
The fact that python-irodsclient>=1.1.9
acts as a ancestor logger and logs everything seems like a bug. I have discussed this with iRODS support and they are aware of it.
Done.
This was originally a part of #1930, but turns out the v2.x releases are breaking. Upgrading without code changes resulted in 600+ test cases failing.
I also need to ensure compatibility of the latest version with both iRODS v4.3 and v4.2. Otherwise this will be postponed into SODAR v1.0.