From c7d5ed1cf36087efb9342c5f27e6292467e5ba73 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 23 Apr 2010 09:08:37 +0000 Subject: [PATCH] MDL-21781 fixed cap checks --- cohort/assign.php | 2 +- cohort/edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cohort/assign.php b/cohort/assign.php index b52eed25533..8d1c1c99f02 100644 --- a/cohort/assign.php +++ b/cohort/assign.php @@ -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); diff --git a/cohort/edit.php b/cohort/edit.php index fe9350717f2..4a484203ab8 100644 --- a/cohort/edit.php +++ b/cohort/edit.php @@ -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)); -- 2.43.0