rssbridge: Whitelist all bridges by default

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2022-07-15 00:19:55 -07:00
parent 9efc56368c
commit 556c476de4
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 15 additions and 1 deletions

View File

@ -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)

View 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')