File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1299,17 +1299,6 @@ def reachable(host: str, port: int) -> bool:
12991299 os .environ .get ("DEFAULT_GROUP_ID" , "" ),
13001300)
13011301
1302- # Controls the default "Who can share to this group" setting for new groups.
1303- # Env var values: "true" (anyone), "false" (no one), "members" (only group members).
1304- _default_group_share = os .environ .get (
1305- "DEFAULT_GROUP_SHARE_PERMISSION" , "members"
1306- ).strip ().lower ()
1307- DEFAULT_GROUP_SHARE_PERMISSION = (
1308- "members"
1309- if _default_group_share == "members"
1310- else _default_group_share == "true"
1311- )
1312-
13131302PENDING_USER_OVERLAY_TITLE = PersistentConfig (
13141303 "PENDING_USER_OVERLAY_TITLE" ,
13151304 "ui.pending_user_overlay_title" ,
Original file line number Diff line number Diff line change @@ -1041,3 +1041,18 @@ def parse_section(section):
10411041####################################
10421042
10431043EXTERNAL_PWA_MANIFEST_URL = os .environ .get ("EXTERNAL_PWA_MANIFEST_URL" )
1044+
1045+ ####################################
1046+ # GROUP DEFAULTS
1047+ ####################################
1048+
1049+ # Controls the default "Who can share to this group" setting for new groups.
1050+ # Env var values: "true" (anyone), "false" (no one), "members" (only group members).
1051+ _default_group_share = os .environ .get (
1052+ "DEFAULT_GROUP_SHARE_PERMISSION" , "members"
1053+ ).strip ().lower ()
1054+ DEFAULT_GROUP_SHARE_PERMISSION = (
1055+ "members"
1056+ if _default_group_share == "members"
1057+ else _default_group_share == "true"
1058+ )
Original file line number Diff line number Diff line change 66
77from sqlalchemy .orm import Session
88from open_webui .internal .db import Base , JSONField , get_db , get_db_context
9- from open_webui .config import DEFAULT_GROUP_SHARE_PERMISSION
9+ from open_webui .env import DEFAULT_GROUP_SHARE_PERMISSION
1010
1111from open_webui .models .files import FileMetadataResponse
1212
You can’t perform that action at this time.
0 commit comments