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