fix: exponse class info only to moderators
This commit is contained in:
@@ -285,9 +285,8 @@
|
||||
|
||||
{%- block script %}
|
||||
{{ super() }}
|
||||
|
||||
{% if is_moderator %}
|
||||
<script>
|
||||
{% if is_moderator %}
|
||||
frappe.boot.user = {
|
||||
"can_create": [],
|
||||
"can_select": ["User"],
|
||||
@@ -299,9 +298,9 @@
|
||||
return name.toLowerCase().replace(/ /g, "-");
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
let class_info = {{ class_info | json }};
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{{ include_script('controls.bundle.js') }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user