diff options
author | Noémi Ványi <sitbackandwait@gmail.com> | 2020-10-23 16:22:55 +0200 |
---|---|---|
committer | Noémi Ványi <sitbackandwait@gmail.com> | 2020-10-25 18:06:18 +0100 |
commit | 33e139cae64bb78157ebca56a5d1a752da95555a (patch) | |
tree | bf4ff91f497f4ec5941acca7ac0fc23e315536cc /searx/webapp.py | |
parent | 6beb84efb8c8b62f1dfa9e7af33db73c06fabcb2 (diff) | |
download | searxng-33e139cae64bb78157ebca56a5d1a752da95555a.tar.gz searxng-33e139cae64bb78157ebca56a5d1a752da95555a.zip |
Let admins lock user preferences
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 5e6a05b19..cf9a09778 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -828,6 +828,10 @@ def preferences(): stats[engine_stat.get('name')]['warn_time'] = True # end of stats + locked_preferences = list() + if 'preferences' in settings and 'lock' in settings['preferences']: + locked_preferences = settings['preferences']['lock'] + return render('preferences.html', selected_categories=get_selected_categories(request.preferences, request.form), all_categories=_get_ordered_categories(), @@ -848,6 +852,7 @@ def preferences(): theme=get_current_theme_name(), preferences_url_params=request.preferences.get_as_url_params(), base_url=get_base_url(), + locked_preferences=locked_preferences, preferences=True) |