Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream settings: Last non-guest user cannot unsubscribe from private streams #12016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sahil839
Copy link
Collaborator

@sahil839 sahil839 commented Mar 30, 2019

This prevents the last non-guest user in a private stream to be unsubscribed from the stream.

Error is shown when last non-guest user tries to unsubscribe and the option of unsubscribe is removed from the stream popover in this case.

Fixes #11962

Testing Plan:
I have tested manually and have also written tests.

GIFs or Screenshots:
Peek 2019-03-30 09-49

@zulipbot
Copy link
Member

Hello @zulip/server-streams members, this pull request was labeled with the "area: stream settings" label, so you may want to check it out!

@sahil839
Copy link
Collaborator Author

@timabbott you can take a look at this PR.

@sahil839
Copy link
Collaborator Author

@timabbott Please take a look at this PR once if you are free.

@sahil839
Copy link
Collaborator Author

@timabbott This PR is ready for review.

@sahil839
Copy link
Collaborator Author

sahil839 commented Oct 5, 2019

@timabbott you can review this PR once.

@sahil839
Copy link
Collaborator Author

@timabbott this PR is ready for review.

@sahil839 sahil839 force-pushed the private-streams-settings branch 3 times, most recently from ecbbc15 to 28b9407 Compare April 4, 2020 19:15
@sahil839
Copy link
Collaborator Author

sahil839 commented Apr 4, 2020

@timabbott please review this PR.

…stream.

This prevents the last non-guest user in a private stream to be unsubscribed
from the stream

Fixes zulip#11962
@zulipbot
Copy link
Member

zulipbot commented Jun 1, 2020

Heads up @sahil839, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

@shidarin
Copy link

Wouldn't it be better to warn the user that unsubscribing will trigger a stream deletion, and then delete it when they go through with it?

Preventing the last user from unsubscribing will prevent the private stream from getting abandoned, but it's not very user friendly.

If the last user is trying to leave, the stream is dead. Let's delete it.

@sahil839
Copy link
Collaborator Author

I agree that this PR does not handle the case when the user subscribing is the last user itself.

I had this in my mind but this PR was not being worked on as we were working on stream admin feature and last stream admin is not allowed to unsubscribe, probably also handling the case of stream deletion (not sure about this though, will add it if not already done).

Thanka for the feedback and for reminding about the stream deletion case!!

@timabbott
Copy link
Sponsor Member

Does it make sense to close or redo or rebase this given our current plans with stream administrators no longer existing?

@sahil839
Copy link
Collaborator Author

Got back to this while visiting my old PRs. Not sure how we will have the new settings based on group permission settings, but I guess it would be something like we would want to atleast keep one user who is allowed to add others to streams.

I can update the PR to make sure there is atleast one user who can add others to the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix issues with private streams containing only guests
4 participants