searx: Update to use shortcut component

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2019-06-09 10:36:46 -04:00
parent 23e4aac400
commit 5fe7f4aaba
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -163,10 +163,10 @@ def diagnose():
def enable_public_access():
"""Allow Searx app to be accessed by anyone with access."""
actions.superuser_run('searx', ['enable-public-access'])
add_shortcut()
app.set_shortcut_login_required(False)
def disable_public_access():
"""Allow Searx app to be accessed by logged-in users only."""
actions.superuser_run('searx', ['disable-public-access'])
add_shortcut()
app.set_shortcut_login_required(True)