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

fixed permission deletion, added rwth intern

parent 3a373f72
No related branches found
No related tags found
No related merge requests found
......@@ -129,11 +129,32 @@ var moderator = {
perm.param2 = moderator.acleditor.acls[i]['param2'];
perm.id = moderator.acleditor.acls[i]['id'];
idlist[idlist.length] = perm.id;
html += '<option data-auth_id="'+perm.id+'">#'+perm.id+' '+perm.type+' '+ ( perm.type == "password" ? ' ("'+perm.param1+'":"'+perm.param2+'")' : '' ) +'</option>';
permstring = '';
switch (perm.type) {
case 'password':
permstring = ' ("'+perm.param1+'":"'+perm.param2+'")'
break;
case 'public':
permstring = '';
break;
case 'rwth':
permstring = ' ( rwth intern ) '
break;
case 'l2p':
permstring = ' ( ' + perm.param1 + ' ) '
break;
}
html += '<option data-auth_id="'+perm.id+'">#'+perm.id+' '+perm.type+' '+ permstring +'</option>';
}
}
html += '</select>';
html += '<select class="col-xs-12 authtype" onchange="moderator.acleditor.acltypechange(this)"><option value="public">public</option><option selected value="password">password</option></select>';
html += '<select class="col-xs-12 authtype" onchange="moderator.acleditor.acltypechange(this)">';
html += '<option value="public">Öffentlich</option>';
html += '<option selected value="password">Password</option>';
html += '<option value="rwth">RWTH intern</option>';
html += '<option value="l2p">L2P Lernraum</option>';
html += '</select>';
html += '<input class="col-xs-12 passwordinput authuser" type="text" placeholder="username">';
html += '<input class="col-xs-12 passwordinput authpassword" type="text" placeholder="password">';
html += '<button class="col-xs-6" onclick="moderator.acleditor.addbtnclick(this)">Add</button>';
......@@ -149,7 +170,7 @@ var moderator = {
},
delbtnclick: function (element) {
moderator.api.set("perm."+$(".acllist option:selected", element.parentElement).data('id')+".deleted",1,true);
moderator.api.set("perm."+$(".acllist option:selected", element.parentElement).data('auth_id')+".deleted",1,true);
},
addbtnclick: function (element) {
var perm = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment