29th / personnel-v3

Personnel management system version 3
https://www.29th.org
2 stars 6 forks source link

Get time zone of unregistered users #234

Closed wilson29thid closed 6 months ago

wilson29thid commented 7 months ago

Our discourse sso plugin should include the timezone in the hash that's returned, so we can use it to show possible drill times. UnregisteredUser already expects it (though we could remove that if need be).

EDIT: I'd forgotten how discourse sso works. The omniauth-discourse plugin runs on the personnel server, and simply interacts with discourse. What discourse provides in a successful response is predefined, and editing that would require creating some sort of new discourse plugin.

So the options are:

  1. Fetch the user's time zone from discourse when they sign in (via an additional api request)
  2. Guess the user's time zone in client-side JavaScript the way discourse does
wilson29thid commented 7 months ago

Alternatively, we could guess it client-side the same way discourse does