Skip to content
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

task/WG-139: add uuid for guest users #155

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

nathanfranklin
Copy link
Collaborator

Overview:

Add uuid for guest users

Related Jira tickets:

Summary of Changes:

Testing Steps:

  1. To be tested with the corresponding hazmapper branch
  2. Create a map
  3. Make it public and copy link
  4. Open icognito window
  5. Go to public link
  6. Look at geoapi logs to see that username now has a uuid for the guests (e.g. Get features of project:2 for user:Guest_5669ae1c-a292-4bf2-b09b-fc63d6f86e10)

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM


Attributes:
username (str): A unique username for the anonymous user, prefixed by 'Guest_'.
If no `guest_unique_id` is provided, username defaults to 'Guest_Unknown'.
Copy link
Contributor

@taoteg taoteg Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under what conditions would this occur? Regardless of user vs guest state, every connected client session should have a UUID, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the response to a null|none UUID value be to generate one? I don't see any conditions where a UUID should not be available. What am I missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are generating the uuid on the client side (i.e. hazmapper/taggit) and then adding to all requests (we put it in 'X-Guest-UUID' in the header). So if someone else was making requests outside of taggit/hazmapper then there would be no X-Guest-UUID in the header. So interacting with the geoapi outside of the 2 clients would make it Guest-Unknown.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Thanks!

Copy link
Contributor

@taoteg taoteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment regarding the Guest_Unknown state, but it doesn't have any functional impact. LGTM!

@nathanfranklin nathanfranklin merged commit d334c14 into master Nov 3, 2023
3 checks passed
@nathanfranklin nathanfranklin deleted the task/WG-139-add-uuid-for-guest-users branch November 3, 2023 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants