refac
This commit is contained in:
1 parent
2e165926de
commit
945275faae
5 files changed
+56
-6
No files matched your search
@@ -36,7 +36,7 @@ from open_webui.models.channels import (
|
||||
ChannelWebhookModel,
|
||||
ChannelWebhookForm,
|
||||
)
|
||||
from open_webui.models.access_grants import AccessGrants, has_public_read_access_grant
|
||||
from open_webui.models.access_grants import AccessGrants, has_public_read_access_grant, has_public_write_access_grant
|
||||
from open_webui.models.messages import (
|
||||
Messages,
|
||||
MessageModel,
|
||||
@@ -88,7 +88,7 @@ def channel_has_access(
|
||||
):
|
||||
return True
|
||||
|
||||
if not strict and permission == 'write' and has_public_read_access_grant(channel.access_grants):
|
||||
if not strict and permission == 'write' and has_public_write_access_grant(channel.access_grants):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in new issue
Block a user