mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-03 02:39:11 -05:00
refac: access_control field
This commit is contained in:
@@ -34,6 +34,12 @@ class Knowledge(Base):
|
||||
data = Column(JSON, nullable=True)
|
||||
meta = Column(JSON, nullable=True)
|
||||
|
||||
access_control = Column(JSON, nullable=True) # Controls data access levels.
|
||||
# NULL for public access (open to all users with "user" role).
|
||||
# {} for individual access (private to the owner).
|
||||
# {"group_ids": ["group_id1", "group_id2"]} for access restricted to specific groups.
|
||||
# {"user_ids": ["user_id1", "user_id2"]} for access restricted to specific users.
|
||||
|
||||
created_at = Column(BigInteger)
|
||||
updated_at = Column(BigInteger)
|
||||
|
||||
@@ -50,6 +56,8 @@ class KnowledgeModel(BaseModel):
|
||||
data: Optional[dict] = None
|
||||
meta: Optional[dict] = None
|
||||
|
||||
access_control = Optional[dict] = None
|
||||
|
||||
created_at: int # timestamp in epoch
|
||||
updated_at: int # timestamp in epoch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user