ucsf-wynton / wynton-website-hpc

The Official Wynton HPC User Website
https://wynton.ucsf.edu/hpc/
2 stars 14 forks source link

Non-PHI/PHI: Force user to make selection once #115

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago

If the PHI flag is not set in the browser's localStorage, have the website prompt the user for:

Hello and welcome to the Wynton HPC website. To customize the instructions for your type of account, please choose whether you have a PHI-enabled Wynton account or not:

  • [ ] I have a PHI-enabled account
  • [ ] I don't have a PHI-enabled account

If you don't know, check your Wynton-approval email. If you make a mistake, you can always switch this setting in the top navigation bar.

HenrikBengtsson commented 1 year ago

@ellestad , what's the subject line of the "Your Wynton account has been created" email message?

jlbl commented 1 year ago

Please no. I hate websites that force me into an interaction the first time I visit. It's an absolutely horrible first impression. "You want to look at info? Nope! You have to answer my question first."

ellestad commented 1 year ago

Do I get extra credit for reading python code?

The message is:

MAIL_MESSAGE = """
Dear %s,

Your Wynton account has now been created.  Your account is '%s' and
your temporary password is '%s'.  Please note that you should immediately
go to https://www.cgl.ucsf.edu/admin/chpass.py to give yourself
a permanent password.  Your temporary password will expire in two weeks.

Also note that you are required to adhere to the Wynton HPC User Agreement
(https://wynton.ucsf.edu/hpc/about/user-agreement.html).  Information
about Wynton is available at: https://wynton.ucsf.edu/hpc/ and information
about getting help is available at: https://wynton.ucsf.edu/hpc/support/index.html

Wynton admins
"""

The subject is created when the mail is sent.

command = ["mailx","-s","Wynton Account Information","-r","do-not-reply@wynton.ucsf.edu",email]
HenrikBengtsson commented 1 year ago

Please no. I hate websites that force me into an interaction the first time I visit. It's an absolutely horrible first impression. "You want to look at info? Nope! You have to answer my question first."

Okay. Could we figure out another way to enable the PHI switch for PHI users when they visit the website the first time? Maybe you could customize the welcome email message to refer new users to either https://wynton.ucsf.edu/welcome.md or https://wynton.ucsf.edu/welcome-phi.md? Then we could set the flag there.

HenrikBengtsson commented 1 year ago

Added support for setting PHI/non-PHI via URL parameter phi.

For instance, https://wynton.ucsf.edu/hpc/get-started/phi-quickstart.html?phi=true will set the PHI flag for the user in their browser's local stage. From there on, Wynton web pages will be rendered in PHI-mode.