feat: 配置功能仅admin可用,operator隐藏配置按钮+后端403拦截
- devices.html: 注入 USER_ROLE 全局变量 - devices.js: 配置按钮仅 USER_ROLE===admin 时渲染 - fixture.py: 页面/指令/保存三个路由均校验 admin 角色
This commit is contained in:
@@ -20,5 +20,8 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
const USER_ROLE = "{{ current_user.role }}";
|
||||
</script>
|
||||
<script src="{{ url_for('static', filename='js/devices.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user