mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
MDL-21781 fixed cap checks
This commit is contained in:
parent
b980c56e2e
commit
c7d5ed1cf3
@ -36,7 +36,7 @@ require_login();
|
||||
$cohort = $DB->get_record('cohort', array('id'=>$id), '*', MUST_EXIST);
|
||||
$context = get_context_instance_by_id($cohort->contextid, MUST_EXIST);
|
||||
|
||||
require_capability('moodle/cohort:view', $context);
|
||||
require_capability('moodle/cohort:assign', $context);
|
||||
|
||||
$PAGE->set_url('/cohort/assign.php', array('id'=>$id));
|
||||
$PAGE->set_Context($context);
|
||||
|
@ -52,7 +52,7 @@ if ($id) {
|
||||
$cohort->description = '';
|
||||
}
|
||||
|
||||
require_capability('moodle/cohort:view', $context);
|
||||
require_capability('moodle/cohort:manage', $context);
|
||||
|
||||
$returnurl = new moodle_url('/cohort/index.php', array('contextid'=>$context->id));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user