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

Restrict 3 dots options menu to comment author #1260

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

MeerUzairWasHere
Copy link
Contributor

This PR fixes the bug where any user could click on the 3 dots (options menu) for comments not authored by them. The 3 dots are now only visible to the comment's author. This ensures proper access control for comment actions.

Added a check to compare the logged-in user ID with the comment author ID before rendering the options menu.

Resolves #1259

Checklist before requesting a review

  • ✅ I have performed a self-review of my code
  • ✅ I assure there is no similar/duplicate pull request regarding same issue

image

@MeerUzairWasHere
Copy link
Contributor Author

@devsargam
Copy link
Collaborator

Thank you sir

@devsargam devsargam merged commit 1f1fe99 into code100x:main Sep 25, 2024
1 check failed
@MeerUzairWasHere MeerUzairWasHere deleted the Fixed-Comments-3-dots branch September 28, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Able to click on 3 dots (options) for comments not authored by the user
2 participants