Open frcroth opened 1 week ago
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Backend should be done. @dieknolle3333 do you want to take a look at this for the frontend?
sounds good!
I feel like adding an iframe increases the probability that users actually read the ToS before accepting them, but then the privacy statement should also be an iframe. And two iframes either make the page quite long or are quite small, so users would have to scroll a lot to read them. Thats why I chose to add a link for now. If anybody disagrees with this decision, please let me know! (pic below shows how it looks with the terms of service in an iframe, for illustrations purposes)
this is how I built the frontend for now
@dieknolle3333 Thank you so much! One thing I noticed is that the frontend sends an "organization" value used as the org id. However, it is a random string, not the slug-name of the organization as I expected (from the changes from #7386). So, if I create an account as "Monika Musterfrau" I would expect the organization value to be either empty (it will be handled by the backend then) or "monika-musterfrau-lab", not "3c98af371407d694"
I will have a look
@frcroth I implemented the org id generation similar to the org name generation now, and this id is sent to /api/auth/createOrganizationWithAdmin
. I also added the ToS modal again thanks to Toms remark on slack. I did not yet test the latter, will do that later today. I did notice that the registration of users works now, thanks to your latest changes! :tada:
edit: I think testing went well :+1:
@dieknolle3333 Thank you so much! One thing I noticed is that the frontend sends an "organization" value used as the org id. However, it is a random string, not the slug-name of the organization as I expected (from the changes from https://github.com/scalableminds/webknossos/pull/7386). So, if I create an account as "Monika Musterfrau" I would expect the organization value to be either empty (it will be handled by the backend then) or "monika-musterfrau-lab", not "3c98af371407d694"
@fm3 I need a little double-check here. I would have expected the frontend to not generate the orga id but letting the backend do this :thinking:. Because I would imagine that the new implementation:
function generateOrganizationId(firstName: string, lastName: string) {
return `${firstName.toLowerCase()}-${lastName.toLowerCase()}-lab`;
}
can lead to naming collisions in case of using the same name when creating an orga. :thinking:.
Oh and during testing I happend to notice, that the wkorg sign up form only has a single password input :thinking:?! The second one to prevent accidental mistyping is missing. Was this removed intentionally? A small investigation showed that this has been the case for a long time. cf. pr https://github.com/scalableminds/webknossos/pull/5350/files where this was already the case.
But IMO there should be a second pwd field to prevent mistyping the password.
=> I opened an issue for this, so we can tackle this in another PR :D https://github.com/scalableminds/webknossos/issues/8215
from my perspective, this PR can be rereviewed :) I left the application.conf edits for testing purposes.
URL of deployed dev instance (used for testing):
Accept terms of service already at sign up / organization creation.
Backend is done. Frontend needs to call /api/termsOfService route and add a checkbox / iframe to the account creation page. Then set "acceptedTermsOfService" in the submitted form to /api/auth/createOrganizationWithAdmin to the TOS VERSION. The Terms of Service acceptance afterward can be removed.
Steps to test:
isWkOrgInstance
in application.conf, it should behave the same regarding the ToSTODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)