mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
add socket edit permission validate
This commit is contained in:
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user