Commit 9edb0c95 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Oauth school selector: Allow to chose 'no school' in school selector in order...

Oauth school selector: Allow to chose 'no school' in school selector in order to allow to retreive old data
parent 855c5cd9
Pipeline #912 passed with stages
in 9 minutes and 26 seconds
......@@ -1221,12 +1221,15 @@ fn oauth_pms(req: &mut Request, oauth_provider: OauthProvider, school_id: Option
if let Some(SchoolIdOrSchoolIds::SchoolIds(school_ids)) = user_data.schoolId {
// Has there been a school selected?
if let Some(school_id) = school_id {
if school_id == "none" {
// Nothing to do
// Is the school a valid school for the user?
if school_ids.contains(&school_id) {
else if school_ids.contains(&school_id) {
if let Some(mut user_id) = user_data.userId {
user_data.userId = Some(user_id)
user_data.userId = Some(user_id);
} else {
return e("#40");
......@@ -8,7 +8,7 @@
{{#each schools}}
<li><a href="{{this.0}}?{{../query}}" class="button is-success">{{this.1}}</a><br />&nbsp;</li>
......@@ -18,6 +18,21 @@
<div class="columns" >
<div class="column">
<h1 class="title is-4">Ohne Schule einloggen</h1>
<p>Sie können sich ohne Schule einloggen, um Daten aus dem Wettbewerb 2020 einzusehen.</p>
<p>Dies ist nur bis Ende 2020 möglich! Damit ist keine Teilnahme am Jugendwettbewerb Informatik 2021 möglich.</p>
<li><a href="none?{{../query}}" class="button is-danger">Ohne Schule einloggen! Keine Teilnahmen am Jugendwettbewerb Informatik 2021 möglich.</a><br />&nbsp;</li>
{{~> (parent)~}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment