File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ class Subscription(BaseModel):
262262 rules : list [SubRule ]
263263 manual_sub_request : SubFormatEnable = Field (default_factory = SubFormatEnable )
264264 applications : list [Application ] = Field (default_factory = list )
265+ allow_browser_config : bool = Field (default = True )
265266
266267 @field_validator ("applications" )
267268 @classmethod
Original file line number Diff line number Diff line change @@ -145,14 +145,18 @@ async def user_subscription(
145145 if db_user .admin and db_user .admin .sub_template
146146 else SUBSCRIPTION_PAGE_TEMPLATE
147147 )
148- conf , media_type = await self .fetch_config (user , ConfigFormat .links )
148+
149+ links = []
150+ if sub_settings .allow_browser_config :
151+ conf , media_type = await self .fetch_config (user , ConfigFormat .links )
152+ links = conf .split ("\n " )
149153
150154 return HTMLResponse (
151155 render_template (
152156 template ,
153157 {
154158 "user" : user ,
155- "links" : conf . split ( " \n " ) ,
159+ "links" : links ,
156160 "apps" : self ._make_apps_import_urls (request_url , sub_settings .applications ),
157161 },
158162 )
You can’t perform that action at this time.
0 commit comments