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

Fix: Allow delete course content in Studio only for admin users #440

Conversation

joidegn
Copy link

@joidegn joidegn commented Nov 10, 2021

Description

Fix a couple of minor issues with SE-4482. Specifically the delete icon would reappear when the visibility of a section was changed.

Supporting information

JIRA Ticket: SE-4482

Testing instructions

  • Login on https://studio.pr440.sandbox.stage.opencraft.hosting/.

  • Enable PREVENT_STAFF_STRUCTURE_DELETION waffle flag from https://studio.pr440.sandbox.stage.opencraft.hosting/admin

  • Go to the setting > Course team of the Demonstration Course

  • Add verified@example.com as the staff for the course

  • Login from the verified@example.com on the studio page

  • verified@example.com should not be able to see the delete button on the course outline page.

  • Change the visibility of a section like here

  • The delete button should not reappear

  • Additionally: confirm whether the business logic is correct for the course creator, instructor and staff roles.

Reviewers

@joidegn joidegn self-assigned this Nov 10, 2021
Copy link
Member

@pkulkark pkulkark left a comment

Choose a reason for hiding this comment

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

@joidegn LGTM 👍

  • I tested this: verified delete button is not visible to non-admin users, as described in the testing instructions
  • I read through the code

@joidegn joidegn merged commit fc181c3 into opencraft-release/koa.3 Nov 17, 2021
joidegn added a commit that referenced this pull request Nov 17, 2021
* Fix PREVENT_STAFF_STRUCTURE_DELETION flag for ajax requests

* Add testcase for CourseCreatorRole
xitij2000 pushed a commit that referenced this pull request Nov 22, 2021
* Fix PREVENT_STAFF_STRUCTURE_DELETION flag for ajax requests

* Add testcase for CourseCreatorRole
@bradenmacdonald bradenmacdonald deleted the joidegn/fix-se-4482-allow-delete-in-studio-only-for-admin-koa.3 branch January 12, 2022 02:08
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.

2 participants