-
Notifications
You must be signed in to change notification settings - Fork 290
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
Give partially and fully shared courses the same deletion behaviour #2278
Give partially and fully shared courses the same deletion behaviour #2278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed #2266 is fixed.
Is it correct that authenticated users (who haven't even create permissions) are allowed to delete courses?
Hm it's a good point, probably not... I suppose before the only reason that they couldn't delete courses was because they couldn't have created them. |
Regarding authenticated users, they should only have read access to courses (see the role definition for more info). |
I've spent some time revisting the logic that existed before this PR:
To clarify, the value of "canDeleteAll" for different user types is: The original logic would have prevented AU/PM/CC users from deleting shared courses which did not belong to them. It is not possible for an AU to have created a course and so this would have always prevented them from deleting courses. Now we want to change the logic so that anyone who can create a course can also delete it if it is shared. I have been playing around with something along the lines of:
Where canCreateAll has the following values: I haven't tested this at all yet just posting my progress in case anyone else has any other thoughts. I will try and have another look at this on monday. I think this logic is quite tricky to get right now that there are more options. Ideally we shouldn't be depending on a check like this - hopefully something for the refactor. |
Actually that doesn't take into account that admins should be able to delete all courses.. So I guess it would need to be something more like:
|
Discussed in stand up - could we possibly add delete permission to the course creator role so that canDeleteAll = true for course creators. Then revert this logic back to what it was before this PR? |
With these changes SA/TA/CC users can delete shared courses, AU/PM users cannot. |
Fixes #2271
Fixes #2266