mirror of
https://github.com/langgenius/dify.git
synced 2026-05-02 06:56:29 +08:00
add socket edit permission validate
This commit is contained in:
parent
9be496f953
commit
bdac6f91dd
@ -49,6 +49,8 @@ def socket_connect(sid, environ, auth):
|
|||||||
user = AccountService.load_logged_in_account(account_id=user_id)
|
user = AccountService.load_logged_in_account(account_id=user_id)
|
||||||
if not user:
|
if not user:
|
||||||
return False
|
return False
|
||||||
|
if not user.has_edit_permission:
|
||||||
|
return False
|
||||||
|
|
||||||
collaboration_service.save_session(sid, user)
|
collaboration_service.save_session(sid, user)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user