fix: exponse class info only to moderators

This commit is contained in:
Jannat Patel
2023-04-11 17:09:38 +05:30
parent 5fb7e88318
commit 7be9eb09e8
3 changed files with 7 additions and 5 deletions

View File

@@ -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 %}