root@zulip-fr01:~# sudo su - zulip
zulip@zulip-fr01:~$ cd deployments/
zulip@zulip-fr01:~/deployments$ cd current
zulip@zulip-fr01:~/deployments/current$ ./manage.py shell
In [1]: from zerver.models import get_realm
In [2]: from zerver.models import get_stream
In [3]: from zerver.models import get_user_by_delivery_email
In [4]: from zerver.actions.streams import do_change_stream_permission
In [5]: r = get_realm("")
In [6]: s = get_stream("stream-name", r)
In [7]: u = get_user_by_delivery_email("user@domain.com", r)
In [8]: do_change_stream_permission(s, invite_only=False, history_public_to_subscribers=True, is_web_public=False, acting_user=u)