-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly use and display user's name and projects #435
Conversation
…UserProfileV1 and UserDataV1
# Conflicts: # webapi/src/main/scala/org/knora/webapi/util/PermissionUtilV1.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hell yeah, I like the multiuser!
Could you possibly add a test to ResoureCreationSpec
that logs in as the multisuer and creates resources in two different projects by changing another project after the first resource creation?
/** | ||
* The current user's data | ||
*/ | ||
userdata:userdata; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you also mean to remove the whole interface userdata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I've moved it to sessionResponseFormats.ts
, which has the whole login response format. There's a sample in sampleLoginResponse.ts
.
I found a nice service that generates TypeScript interfaces from sample data: http://json2ts.com/ |
- Remove project basepath, which is not used.
OK I changed |
/** | ||
* The IRIs of the groups that the user belongs to. | ||
*/ | ||
groups: Array<string>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use the KnoraIri pseudo type here just to make it more clear that is is an Knora IRI: https://github.com/dhlab-basel/Knora/blob/wip/salsah-username/salsah/src/typescript_interfaces/basicMessageComponents.ts#L245
go on, genius |
User-visible changes in SALSAH:
Internal changes:
userProfile
, instead of just the project IRIs.userProfile
on login, rather than justuserData
, and store it.userData
from API responses, since SALSAH no longer needs it.Note: To get the GUI tests to work, I had to change them so the user is logged in at the beginning of each test, and logged out at the end of each test. Otherwise reloading the page seemed to make SALSAH forget that the user was logged in. I had this problem only with Selenium, not in real life.
Fixes #118.
Fixes #415.