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

message-editing: Limit who can "resolve" a topic to those who can post. #22087

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

Conversation

anurastogiji
Copy link
Collaborator

Issue #21281

We add a check for people who can send message in the stream and only
those user can resolve the topic of message sent in the stream.

image
Zoe is normal user and the "resolve" option is not visible to the user since only admin can post in the stream.

We add a check for people who can send message in the stream and only
those user can resolve the topic of message sent in the stream.

Fixes zulip#21281
@zulipbot
Copy link
Member

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

@anurastogiji
Copy link
Collaborator Author

@alexmv ,does this implementation look good?

@andersk
Copy link
Member

andersk commented May 18, 2022

This restriction needs to be enforced on the backend, not just the frontend.

@alexmv
Copy link
Collaborator

alexmv commented May 18, 2022

Doing this limiting on the frontend is a good first step, especially for user experience, but as @andersk points out, we also need to enforce this in the backend.

For the frontend change, it looks like this copies a bunch of code from validate_stream_message_post_policy. We should abstract that out into a common function rather than duplicate it.

@asah
Copy link
Collaborator

asah commented May 19, 2022

Also, please add unit test(s):
https://zulip.readthedocs.io/en/latest/testing/testing-with-django.html

@zulipbot
Copy link
Member

Heads up @anurastogiji, we just merged some commits that conflict with the changes you 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/main branch and resolve your pull request's merge conflicts accordingly.

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.

None yet

5 participants