Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何关闭导出功能? #1367

Closed
hbbdgyb opened this issue Feb 7, 2022 · 3 comments
Closed

请问如何关闭导出功能? #1367

hbbdgyb opened this issue Feb 7, 2022 · 3 comments
Labels
question Further information is requested

Comments

@hbbdgyb
Copy link

hbbdgyb commented Feb 7, 2022

问题描述

请问如何关闭导出功能?
或者针对特定的人关闭导出功能?

版本信息

  • 应用版本/分支:Release v1.8.1
  • 部署方式:Docker
@hbbdgyb hbbdgyb added the question Further information is requested label Feb 7, 2022
@hbbdgyb
Copy link
Author

hbbdgyb commented Feb 7, 2022

用了1个小时研究明白了,这个程序里没有这一项功能。
我改了半天/opt下的文件都不生效,原来是docker没有映射本地文件。-_-||

进入docker容器,找到sqlquery.html。修改showExport相关配置为以下内容。
这个文件一共有两处需要修改。

{% if request.user.id == 3%} showExport:false, {% else %} showExport:true, {% endif %}

@LeoQuote
Copy link
Collaborator

LeoQuote commented Feb 7, 2022

这个是前端的, 因为关闭导出也意义不大, 数据泄露风险还在, 所以没做相应的开关, 欢迎 pr

@weideguo
Copy link
Collaborator

weideguo commented Feb 8, 2022

用了1个小时研究明白了,这个程序里没有这一项功能。 我改了半天/opt下的文件都不生效,原来是docker没有映射本地文件。-_-||

进入docker容器,找到sqlquery.html。修改showExport相关配置为以下内容。 这个文件一共有两处需要修改。

{% if request.user.id == 3%} showExport:false, {% else %} showExport:true, {% endif %}

你这写法太死了,增加个权限,showExport这个变量的值由sql/views.py对用户进行权限判断后传入不是更好?

weideguo added a commit to weideguo/Archery that referenced this issue Feb 8, 2022
hhyo pushed a commit that referenced this issue Feb 12, 2022
* 增加下载的权限(#1367)

* 修复拼写错误

* 补加SQL文件

* 变量名修改以及其他优化

* 权限名修改
@hhyo hhyo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants