From 675c462a557b65c0cfa3a37169435fcf731331bf Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sat, 25 Feb 2023 11:39:51 +0100 Subject: [PATCH 1/2] Don't force current promo when loggin via kerberos --- auth_krb5.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_krb5.go b/auth_krb5.go index dda6374..4aaefec 100644 --- a/auth_krb5.go +++ b/auth_krb5.go @@ -83,7 +83,7 @@ func checkAuthKrb5(c *gin.Context) { return } - if usr, err := completeAuth(c, lf.Login, lf.Login+"@epita.fr", "", "", currentPromo, "", nil); err != nil { + if usr, err := completeAuth(c, lf.Login, lf.Login+"@epita.fr", "", "", 0, "", nil); err != nil { c.AbortWithStatusJSON(http.StatusUnauthorized, gin.H{"errmsg": err.Error()}) return } else { From 5140eafc517cb09ce63f2849c843cdfe5a11ee9a Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Fri, 3 Mar 2023 12:38:13 +0100 Subject: [PATCH 2/2] ui: Also color score on works page --- ui/src/routes/works/+page.svelte | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/routes/works/+page.svelte b/ui/src/routes/works/+page.svelte index c6564fa..722a343 100644 --- a/ui/src/routes/works/+page.svelte +++ b/ui/src/routes/works/+page.svelte @@ -120,7 +120,16 @@ {#await getScore(work)}
{:then score} - {score.score} + = 18} + class:bg-info={score.score < 18 && score.score >= 15} + class:bg-warning={score.score < 15 && score.score >= 9} + class:bg-danger={score.score < 9} + class:bg-dark={score.score == "N/A"} + > + {score.score} + {:catch error} {/await}