Commit 58395420 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Fix to 35a4bf7e so that students with OAuth accounts can log in again

parent fd5f188d
Pipeline #989 passed with stages
in 18 minutes and 29 seconds
...@@ -1016,6 +1016,8 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id: ...@@ -1016,6 +1016,8 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
} }
if session.oauth_provider != Some("pms".to_string()) { if session.oauth_provider != Some("pms".to_string()) {
data.insert("profile_not_pms".into(), to_json(&true)); data.insert("profile_not_pms".into(), to_json(&true));
// This should be changed so that it can be configured if
// addresses can be obtained from OAuth provider
} }
data.insert("ownprofile".into(), to_json(&true)); data.insert("ownprofile".into(), to_json(&true));
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</h3> </h3>
</div></div> </div></div>
<div class="columns"> <div class="columns">
<div class="column is-8 is-offset-2" {{#if firstlogin }}style="border: 3px solid black; margin-bottom: 20px; margin-top: 20px; padding: 30px;"{{/if}}> <div class="column is-8 is-offset-2" {{#if firstlogin }}{{#if profile_logincode}}style="border: 3px solid black; margin-bottom: 20px; margin-top: 20px; padding: 30px;"{{/if}}{{/if}}>
{{#if profile_username}} {{#if profile_username}}
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
{{#if firstlogin }} {{#if firstlogin }}{{#if profile_logincode}}
<script> <script>
document.getElementById("delayvisibility1").style.display = "none"; document.getElementById("delayvisibility1").style.display = "none";
document.getElementById("delayvisibility2").style.display = "none"; document.getElementById("delayvisibility2").style.display = "none";
...@@ -217,7 +217,7 @@ function delayvisibilitybuttonclick() { ...@@ -217,7 +217,7 @@ function delayvisibilitybuttonclick() {
document.getElementById("delayvisibility2").style.display = ""; document.getElementById("delayvisibility2").style.display = "";
} }
</script> </script>
{{/if}} {{/if}}{{/if}}
{{/inline}} {{/inline}}
{{~> (parent)~}} {{~> (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