sharezone-app
sharezone-app copied to clipboard
User can delete/edit their own homework even if they don't have the permission to.
Describe the bug
A user can delete a homework that he created even after loosing the permissions to.
Steps to reproduce the bug
- Create user "student"
- Create user "teacher"
- "teacher" creates a course named "maths"
- "teacher" creates a homework named "Foo teacher".
- "student" creates a homework named "Bar student".
- "teacher" changes the permissions of the course to "only admins" (only admins can create/edit/delete)
- "student" tries to edit/delete "Foo teacher" --> He can't, no option for deletion or editing is shown.
- "student" tries to edit/delete "Bar student"
Current broken behavior
The student can edit or delete the "Bar student" homework even though he doesn't have the permissions to anymore.
Expected behavior
The student should not be able to edit the homework.
Screenshots, videos or logs
https://storage.googleapis.com/sharezone-archive/GitHub_Resources/permissions_bug_github_1110.mp4
Tested device
- Device: PC
- OS: Windows 11
- App type: Web
- App version: 1.7.8