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

Bugfix: Removed moderator rights to edit posts; added test #119

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

FelberMartin
Copy link
Collaborator

Problem Description

Currently a user with moderation rights can edit anyone's posts. As discussed in the Communication Team Meeting, this behaviour is unwanted.

Changes

  • Removed moderator rights to edit other's posts
  • Created unit test

Steps for testing

  • Login as an instructor (has moderation rights)
  • Long press another users post
  • See that "Edit" is not available anymore
  • Press on a post of yourself
  • "Edit" is still possible

@FelberMartin FelberMartin self-assigned this Nov 19, 2024
@FelberMartin FelberMartin added the ready for review This PR can be reviewed label Nov 19, 2024
Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

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

Code lgtm. Works as expected!
As an instructor, I can only edit my own posts, but not others posts.

Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

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

Sorry I should have looked better, I missed one crucial thing, see below.

@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Nov 19, 2024
Copy link
Contributor

@TimOrtel TimOrtel left a comment

Choose a reason for hiding this comment

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

The code looks good but I think it would be better if you added UI tests. We should have tests that actually view some posts, long click a post and assert that the edit button is available or not in the bottom sheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants