bugfix non-admin errors
This commit is contained in:
parent
fc434f0d62
commit
bdaf3730c4
|
@ -15,7 +15,9 @@ function load() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (user_perms) {
|
||||||
document.querySelector('#user_perm_form').addEventListener('submit', submit_user_perms);
|
document.querySelector('#user_perm_form').addEventListener('submit', submit_user_perms);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit_user_perms(event) {
|
function submit_user_perms(event) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>Buckler</title>
|
<title>Buckler</title>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
|
<link rel="stylesheet" type="text/css" href="/static/buckler.css">
|
||||||
<script>
|
<script>
|
||||||
var user_perms = {{ user_perms_json|safe }};
|
var user_perms = {% if request['session']['admin'] %}{{ user_perms_json|safe }}{% else %}null{% endif %};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="/static/buckler.js"></script>
|
<script type="text/javascript" src="/static/buckler.js"></script>
|
||||||
<script>window.onload = load;</script>
|
<script>window.onload = load;</script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user