mirror of
https://github.com/langgenius/dify.git
synced 2026-03-13 04:49:41 +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)
|
||||
if not user:
|
||||
return False
|
||||
if not user.has_edit_permission:
|
||||
return False
|
||||
|
||||
collaboration_service.save_session(sid, user)
|
||||
return True
|
||||
|
||||
Loading…
Reference in New Issue
Block a user