mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
rssbridge: Whitelist all bridges by default
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
9efc56368c
commit
556c476de4
@ -14,7 +14,7 @@ from plinth.modules.users.components import UsersAndGroups
|
||||
from plinth.package import Packages
|
||||
from plinth.utils import format_lazy
|
||||
|
||||
from . import manifest
|
||||
from . import manifest, privileged
|
||||
|
||||
_description = [
|
||||
_('RSS-Bridge generates RSS and Atom feeds for websites that do not have '
|
||||
@ -89,4 +89,5 @@ class RSSBridgeApp(app_module.App):
|
||||
def setup(helper, old_version=None):
|
||||
"""Install and configure the module."""
|
||||
app.setup(old_version)
|
||||
helper.call('post', privileged.setup)
|
||||
helper.call('post', app.enable)
|
||||
|
||||
13
plinth/modules/rssbridge/privileged.py
Normal file
13
plinth/modules/rssbridge/privileged.py
Normal file
@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
"""Configure RSS-Bridge."""
|
||||
|
||||
import pathlib
|
||||
|
||||
from plinth.actions import privileged
|
||||
|
||||
|
||||
@privileged
|
||||
def setup():
|
||||
"""Configure RSS-Bridge by enable all bridges."""
|
||||
enable_list = pathlib.Path('/etc/rss-bridge/whitelist.txt')
|
||||
enable_list.write_text('*\n', encoding='utf-8')
|
||||
Loading…
x
Reference in New Issue
Block a user