Commit 75a08bfc authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Do not show address in profile for accounts with pms oauth login

parent aa00d8ac
Pipeline #474 failed with stages
in 31 minutes and 3 seconds
......@@ -830,6 +830,9 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
if session.managed_by.is_none() {
data.insert("profile_not_in_group".into(), to_json(&true));
}
if session.oauth_provider != Some("pms".to_string()) {
data.insert("profile_not_pms".into(), to_json(&true));
}
data.insert("ownprofile".into(), to_json(&true));
if let Some(query) = query_string {
......@@ -868,7 +871,9 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
if user.managed_by.is_none() {
data.insert("profile_not_in_group".into(), to_json(&true));
}
if session.oauth_provider != Some("pms".to_string()) {
data.insert("profile_not_pms".into(), to_json(&true));
}
data.insert("ownprofile".into(), to_json(&false));
if let Some(query) = query_string {
......
......@@ -73,6 +73,7 @@
<td>Nachname:</td><td><input name="lastname" value="{{ profile_lastname }}" required></td>
</tr>
{{#if profile_not_in_group}}
{{#if profile_not_pms}}
<tr>
<td>Straße und Hausnummer:</td><td><input name="street" value="{{ profile_street }}"></td>
</tr>
......@@ -82,6 +83,7 @@
<tr>
<td>Stadt:</td><td><input name="city" value="{{ profile_city }}"></td>
</tr>
{{/if}}
{{/if}}
<tr>
<td>Jahrgangsstufe:</td><td>
......
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