mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
sharing: Allow directories to be publicly shared
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
d0ed538bfa
commit
1eec1cf9ce
4 files changed
+54
-20
No files matched your search
@@ -69,11 +69,12 @@ def list_shares():
|
||||
return json.loads(output)['shares']
|
||||
|
||||
|
||||
def add_share(name, path, groups):
|
||||
def add_share(name, path, groups, is_public):
|
||||
"""Add a new share by called the action script."""
|
||||
actions.superuser_run(
|
||||
'sharing',
|
||||
['add', '--name', name, '--path', path, '--groups'] + groups)
|
||||
actions.superuser_run('sharing', [
|
||||
'add', '--name', name, '--path', path, '--is-public', is_public,
|
||||
'--groups'
|
||||
] + groups)
|
||||
|
||||
|
||||
def remove_share(name):
|
||||
|
||||
Reference in new issue
Block a user