mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
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:
parent
d41bb0ae76
commit
5ec7f49c8b
@ -18,4 +18,7 @@
|
|||||||
<Location /syncthing/>
|
<Location /syncthing/>
|
||||||
Include includes/freedombox-single-sign-on.conf
|
Include includes/freedombox-single-sign-on.conf
|
||||||
ProxyPass http://localhost:8384/
|
ProxyPass http://localhost:8384/
|
||||||
|
<IfModule mod_auth_pubtkt.c>
|
||||||
|
TKTAuthToken "admin" "syncthing"
|
||||||
|
</IfModule>
|
||||||
</Location>
|
</Location>
|
||||||
|
|||||||
@ -27,6 +27,7 @@ from plinth import cfg
|
|||||||
from plinth import frontpage
|
from plinth import frontpage
|
||||||
from plinth import service as service_module
|
from plinth import service as service_module
|
||||||
from plinth.menu import main_menu
|
from plinth.menu import main_menu
|
||||||
|
from plinth.modules.users import register_group
|
||||||
from plinth.utils import format_lazy
|
from plinth.utils import format_lazy
|
||||||
from .manifest import clients
|
from .manifest import clients
|
||||||
|
|
||||||
@ -61,6 +62,8 @@ description = [
|
|||||||
|
|
||||||
clients = clients
|
clients = clients
|
||||||
|
|
||||||
|
group = ('syncthing', _('Administer Syncthing application'))
|
||||||
|
|
||||||
service = None
|
service = None
|
||||||
|
|
||||||
|
|
||||||
@ -69,6 +72,7 @@ def init():
|
|||||||
menu = main_menu.get('apps')
|
menu = main_menu.get('apps')
|
||||||
menu.add_urlname(name, 'glyphicon-refresh',
|
menu.add_urlname(name, 'glyphicon-refresh',
|
||||||
'syncthing:index', short_description)
|
'syncthing:index', short_description)
|
||||||
|
register_group(group)
|
||||||
|
|
||||||
global service
|
global service
|
||||||
setup_helper = globals()['setup_helper']
|
setup_helper = globals()['setup_helper']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user