Skip to content

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

Merged
joidegn merged 3 commits into
opencraft-release/koa.3from
joidegn/fix-se-4482-allow-delete-in-studio-only-for-admin-koa.3
Nov 17, 2021
Merged

Fix: Allow delete course content in Studio only for admin users#440
joidegn merged 3 commits into
opencraft-release/koa.3from
joidegn/fix-se-4482-allow-delete-in-studio-only-for-admin-koa.3

Conversation

@joidegn

@joidegn joidegn commented Nov 10, 2021

Copy link
Copy Markdown

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 requested a review from nizarmah November 10, 2021 06:43
@joidegn joidegn self-assigned this Nov 10, 2021
@joidegn
joidegn requested a review from pkulkark November 11, 2021 09:29

@pkulkark pkulkark left a comment

Copy link
Copy Markdown
Member

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