syncthing: Restrict administration to users in group syncthing

- Add syncthing group
- Add validation in syncthing-plinth configuration

* Tested on UI

Signed-off-by: Aakanksha Saini <aakanksa@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Aakanksha Saini 2018-01-08 16:11:53 +05:30 committed by Sunil Mohan Adapa
parent d41bb0ae76
commit 5ec7f49c8b
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 7 additions and 0 deletions

View File

@ -18,4 +18,7 @@
<Location /syncthing/>
Include includes/freedombox-single-sign-on.conf
ProxyPass http://localhost:8384/
<IfModule mod_auth_pubtkt.c>
TKTAuthToken "admin" "syncthing"
</IfModule>
</Location>

View File

@ -27,6 +27,7 @@ from plinth import cfg
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from plinth.modules.users import register_group
from plinth.utils import format_lazy
from .manifest import clients
@ -61,6 +62,8 @@ description = [
clients = clients
group = ('syncthing', _('Administer Syncthing application'))
service = None
@ -69,6 +72,7 @@ def init():
menu = main_menu.get('apps')
menu.add_urlname(name, 'glyphicon-refresh',
'syncthing:index', short_description)
register_group(group)
global service
setup_helper = globals()['setup_helper']