-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
1.9.0版本启动后对于没有权限的页面返回500错误 #1884
Comments
我改了,但是不知道怎么提pr,求指导 |
Merged
hhyo
added a commit
that referenced
this issue
Oct 7, 2022
* 修复 is_ajax() 判断失效的问题 fix #1884 * 增加测试用例
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
重现步骤
1.启动1.9.0版本
2.新建非管理员用户test仅给与permission|菜单权限
3test用户尝试访问没有权限的页面
4.报错500
5.后台日志 File "/opt/venv4archery/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/archery/common/utils/permission.py", line 14, in wrapper
if request.is_ajax():
AttributeError: 'WSGIRequest' object has no attribute 'is_ajax'
(看起来request.is_ajax函数不兼容了)
预期外的结果
报错500 internal error
应该提示
日志文本
No response
版本
1.9.0.
部署方式
Docker
是否还有其他可以辅助定位问题的信息?比如数据库版本等
无
The text was updated successfully, but these errors were encountered: