From 5f658281878695ff2e5e1b21eecce9bd9bbc065e Mon Sep 17 00:00:00 2001 From: Frank Matranga Date: Wed, 29 Dec 2021 00:03:24 -0500 Subject: [PATCH 1/2] Only allow Discord sign-ups 67% of users have a Discord account linked but not CAS. If they accidentally sign up with CAS then a duplicate is created with no way of us realizing it unless the user tries to connect Discord. If we only allow Discord sign-up, users cannot accidentally create duplicate accounts and we can direct everyone to signup/login with Discord and then immediately connect with CAS, filling in the blanks. Once we have done that, we can reenable the other signup methods. --- src/templates/auth.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/templates/auth.rs b/src/templates/auth.rs index c132edc9..dbb66299 100644 --- a/src/templates/auth.rs +++ b/src/templates/auth.rs @@ -85,12 +85,12 @@ pub fn login() -> Template { pub fn register() -> Template { // Make list of identity providers in account creation configuration. let items: Vec> = vec![ - item( - GitHubOauth::register_path(), - "btn-github mb-2", - "Register using GitHub", - Some("github"), - ), +// item( +// GitHubOauth::register_path(), +// "btn-github mb-2", +// "Register using GitHub", +// Some("github"), +// ), item( DiscordOAuth::register_path(), "btn-discord mb-2", @@ -99,12 +99,12 @@ pub fn register() -> Template { // a Feather icon. Do not use it in other places, as it won't work. Some("discord"), ), - item( - RpiCas::register_path(), - "btn-rpi", - "Register using RPI CAS", - None, - ), +// item( +// RpiCas::register_path(), +// "btn-rpi", +// "Register using RPI CAS", +// None, +// ), ]; // Create and return template. From 6bdb6585a78a695d1496a81ec9d125b018e420d4 Mon Sep 17 00:00:00 2001 From: Nia Calia-Bogan Date: Wed, 29 Dec 2021 19:17:33 -0500 Subject: [PATCH 2/2] Fix a few typos --- src/templates/auth.rs | 2 +- templates/auth.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/auth.rs b/src/templates/auth.rs index dbb66299..d6f65f9e 100644 --- a/src/templates/auth.rs +++ b/src/templates/auth.rs @@ -69,7 +69,7 @@ pub fn login() -> Template { item( DiscordOAuth::login_path(), "btn-discord mb-2", - "Login using", + "Login using Discord", // This is manually coded for in the template file and is not // a Feather icon. Do not use it in other places, as it won't work. Some("discord"), diff --git a/templates/auth.hbs b/templates/auth.hbs index 2460bf05..bad2911d 100644 --- a/templates/auth.hbs +++ b/templates/auth.hbs @@ -9,7 +9,7 @@ {{message}} {{#if icon}} {{#if (eq icon "discord")}} - Discord + {{else}} {{/if}}