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

同一个资源组的账号查看其他账号提交的SQL出现403错误 #2730

Open
firehalt opened this issue Jul 16, 2024 · 2 comments
Open

Comments

@firehalt
Copy link

firehalt commented Jul 16, 2024

重现步骤

例如:A和B都在同一个资源组和用户组里面(权限完全一样);现在A提交的SQL上线内容,B点开查看就会出现403

image

预期外的结果

1.想所有人都能看见提交的SQL内容

日志文本

2024-07-16 17:55:34,180][MainThread:140483836245824][task_id:default][exception_logging_middleware.py:12][ERROR]- Traceback (most recent call last):
  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/sql/views.py", line 187, in detail
    raise PermissionDenied
django.core.exceptions.PermissionDenied

2024-07-16 17:55:34,180 - default - ERROR - Traceback (most recent call last):
  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/sql/views.py", line 187, in detail
    raise PermissionDenied
django.core.exceptions.PermissionDenied

2024-07-16 17:55:34,201 - django.request - WARNING - Forbidden (Permission denied): /detail/275/
Traceback (most recent call last):
  File "/opt/venv4archery/lib/python3.9/site-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  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/sql/views.py", line 187, in detail
    raise PermissionDenied
django.core.exceptions.PermissionDenied

版本

1.10.0

部署方式

K8S

是否还有其他可以辅助定位问题的信息?比如数据库版本等

@ghostclearsky
Copy link

给用户的权限组添加这个权限:”sql | permission | 审核SQL上线工单“ 就可以了。

@firehalt
Copy link
Author

给用户的权限组添加这个权限:”sql | permission | 审核SQL上线工单“ 就可以了。

这个可以了,谢谢!
新问题:如果A和B在不同的资源组和用户组,如何让A看见B提交的sql内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants