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

CTP-3559 course mod permissions #5

Merged

Conversation

watson8
Copy link
Contributor

@watson8 watson8 commented Aug 19, 2024

There are several instances in the plugin where $PAGE->context is being used to check capabilities, after require_login() has been called with the course only. This would mean that the course context is being used for the capability check instead of the module context

@watson8 watson8 requested a review from aspark21 August 19, 2024 15:33
@@ -26,43 +26,42 @@

global $CFG, $PAGE, $DB, $OUTPUT;

$course_module_id = required_param('cmid', PARAM_INT);
$id = optional_param('id', 0, PARAM_INT);
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we sure this isn't needed?

@aspark21 aspark21 merged commit f2dbc3d into main Aug 28, 2024
0 of 6 checks passed
@watson8 watson8 deleted the CTP-3559-Coursework-review-permissions-context-level-usage branch September 16, 2024 15:25
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