mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 09:16:44 +00:00
feat: Add ability to change permissions on group creation API
This commit is contained in:
parent
2818f3cf95
commit
217e3a13c8
@ -80,10 +80,10 @@ class GroupResponse(BaseModel):
|
|||||||
class GroupForm(BaseModel):
|
class GroupForm(BaseModel):
|
||||||
name: str
|
name: str
|
||||||
description: str
|
description: str
|
||||||
|
permissions: Optional[dict] = None
|
||||||
|
|
||||||
|
|
||||||
class GroupUpdateForm(GroupForm):
|
class GroupUpdateForm(GroupForm):
|
||||||
permissions: Optional[dict] = None
|
|
||||||
user_ids: Optional[list[str]] = None
|
user_ids: Optional[list[str]] = None
|
||||||
admin_ids: Optional[list[str]] = None
|
admin_ids: Optional[list[str]] = None
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ class GroupTable:
|
|||||||
with get_db() as db:
|
with get_db() as db:
|
||||||
group = GroupModel(
|
group = GroupModel(
|
||||||
**{
|
**{
|
||||||
**form_data.model_dump(),
|
**form_data.model_dump(exclude_none=True),
|
||||||
"id": str(uuid.uuid4()),
|
"id": str(uuid.uuid4()),
|
||||||
"user_id": user_id,
|
"user_id": user_id,
|
||||||
"created_at": int(time.time()),
|
"created_at": int(time.time()),
|
||||||
|
Loading…
Reference in New Issue
Block a user