Skip to content
Snippets Groups Projects
Commit d71c3368 authored by Andreas Valder's avatar Andreas Valder
Browse files

added "fsmpi" permission, closes #143

parent c4dc313a
No related branches found
No related tags found
No related merge requests found
...@@ -140,6 +140,7 @@ def permdescr(perms): ...@@ -140,6 +140,7 @@ def permdescr(perms):
password = False password = False
l2p_courses = [] l2p_courses = []
rwth_intern = False rwth_intern = False
fsmpi_intern = False
for perm in perms: for perm in perms:
if perm['type'] == 'public': if perm['type'] == 'public':
public = True public = True
...@@ -149,12 +150,16 @@ def permdescr(perms): ...@@ -149,12 +150,16 @@ def permdescr(perms):
l2p_courses.append(perm['param1']) l2p_courses.append(perm['param1'])
elif perm['type'] == 'rwth': elif perm['type'] == 'rwth':
rwth_intern = True rwth_intern = True
elif perm['type'] == 'fsmpi':
fsmpi_intern = True
if public or not perms: if public or not perms:
return 'public', 'Öffentlich verfügbar' return 'public', 'Öffentlich verfügbar'
if rwth_intern: if rwth_intern:
if password: if password:
return 'rwth', 'Nur für RWTH-Angehörige und Nutzer mit Passwort verfügbar' return 'rwth', 'Nur für RWTH-Angehörige und Nutzer mit Passwort verfügbar'
return 'rwth', 'Nur für RWTH-Angehörige verfügbar' return 'rwth', 'Nur für RWTH-Angehörige verfügbar'
if fsmpi_intern:
return 'fsmpi', 'Nur für Fachschaftler verfügbar'
if l2p_courses: if l2p_courses:
if password: if password:
return 'l2p', 'Nur für Teilnehmer der Veranstaltung und Nutzer mit Passwort verfügbar' return 'l2p', 'Nur für Teilnehmer der Veranstaltung und Nutzer mit Passwort verfügbar'
......
static/fsmpi.png

6.57 KiB

...@@ -165,6 +165,9 @@ var moderator = { ...@@ -165,6 +165,9 @@ var moderator = {
case 'rwth': case 'rwth':
permstring = '(rwth intern)' permstring = '(rwth intern)'
break; break;
case 'fsmpi':
permstring = '(fsmpi intern)'
break;
case 'l2p': case 'l2p':
permstring = '(' + perm.param1 + ')' permstring = '(' + perm.param1 + ')'
break; break;
...@@ -177,6 +180,7 @@ var moderator = { ...@@ -177,6 +180,7 @@ var moderator = {
html += '<option value="public">Öffentlich</option>'; html += '<option value="public">Öffentlich</option>';
html += '<option selected value="password">Passwort</option>'; html += '<option selected value="password">Passwort</option>';
html += '<option value="rwth">RWTH intern</option>'; html += '<option value="rwth">RWTH intern</option>';
html += '<option value="fsmpi">FSMPI intern</option>';
html += '<option value="l2p">L2P Lernraum</option>'; html += '<option value="l2p">L2P Lernraum</option>';
html += '</select>'; html += '</select>';
html += '<input class="col-xs-12 passwordinput authuser" type="text" placeholder="Benutzername">'; html += '<input class="col-xs-12 passwordinput authuser" type="text" placeholder="Benutzername">';
......
...@@ -203,6 +203,9 @@ $('#embedcodebtn').popover( ...@@ -203,6 +203,9 @@ $('#embedcodebtn').popover(
{% if permdescription[0] == 'rwth' %} {% if permdescription[0] == 'rwth' %}
{% set permlogos = '<span class="fa" aria-hidden="true" style="width: 25px; height: 20px; background-size: cover; background-image: url(\'/static/rwth.png\');"></span>' %} {% set permlogos = '<span class="fa" aria-hidden="true" style="width: 25px; height: 20px; background-size: cover; background-image: url(\'/static/rwth.png\');"></span>' %}
{% endif %} {% endif %}
{% if permdescription[0] == 'fsmpi' %}
{% set permlogos = '<span class="fa" aria-hidden="true" style="width: 25px; height: 20px; background-size: cover; background-image: url(\'/static/fsmpi.png\');"></span>' %}
{% endif %}
{% if ismod() %} {% if ismod() %}
<button class="btn btn-default modmoderator_permissioneditor" data-type="{{ type }}" data-id="{{ id }}"> <button class="btn btn-default modmoderator_permissioneditor" data-type="{{ type }}" data-id="{{ id }}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment