enh: channel read/write perm

This commit is contained in:
Timothy Jaeryang Baek
2025-09-24 10:09:59 -05:00
parent 6d69ea3ac7
commit ac879513e5
8 changed files with 58 additions and 14 deletions

View File

@@ -110,9 +110,13 @@ def has_access(
type: str = "write",
access_control: Optional[dict] = None,
user_group_ids: Optional[Set[str]] = None,
strict: bool = True,
) -> bool:
if access_control is None:
return type == "read"
if strict:
return type == "read"
else:
return True
if user_group_ids is None:
user_groups = Groups.get_groups_by_member_id(user_id)