Skip to content

Allow users to delete comments if they wrote them#29

Merged
kashiish merged 12 commits intomasterfrom
delete-user-comments
Jun 11, 2020
Merged

Allow users to delete comments if they wrote them#29
kashiish merged 12 commits intomasterfrom
delete-user-comments

Conversation

@kashiish
Copy link
Copy Markdown
Owner

These commits allow users to delete their own comments and no one else's. I added a new attribute to the Comment class called isAuthor which specifies if the current user is the author of the comment or not. I also added a new field to the Comment entity that stores the user id of the author. If the current user's id matches the userId of the comment, a delete comment option will show up for the comment.

Copy link
Copy Markdown
Collaborator

@betrevisan betrevisan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@samfalberg samfalberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kashiish kashiish merged commit 415359c into master Jun 11, 2020
@kashiish kashiish deleted the delete-user-comments branch June 11, 2020 15:58
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.

3 participants