In CKAN v2.10 this changed again, so this authenticate method is returning the whole user object
If this is urgent we can apply the solution and keep it in a branch. In opposite, I can create one robust solution where we'll check CKAN version and handle user data in a way to be compatible with CKAN version.
Acceptance criteria
Tasks
Analysis
This line of code https://github.com/datopian/ckanext-auth/blob/master/ckanext/auth/logic.py#L30 is calling
authenticate
method fromckan.lib.authenticator
.In CKAN v2.8 it was returning
user.name
, but in CKAN v2.9 it is returning a string in formatuser.id, 1
Solution
We need to get user name with:
instead of:
because it is returning
user.id, 1
as a string.In CKAN v2.10 this changed again, so this
authenticate
method is returning the wholeuser object
If this is urgent we can apply the solution and keep it in a branch. In opposite, I can create one robust solution where we'll check CKAN version and handle user data in a way to be compatible with CKAN version.