mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-46509 enrol: fix usage of incorrect enrol plugin in capability check
This commit is contained in:
parent
e609e6cf02
commit
85b030cc39
@ -42,7 +42,7 @@ class enrol_category_plugin extends enrol_plugin {
|
||||
global $DB;
|
||||
|
||||
$context = context_course::instance($instance->courseid);
|
||||
if (!has_capability('enrol/database:config', $context)) {
|
||||
if (!has_capability('enrol/category:config', $context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ class enrol_ldap_plugin extends enrol_plugin {
|
||||
*/
|
||||
public function can_delete_instance($instance) {
|
||||
$context = context_course::instance($instance->courseid);
|
||||
if (!has_capability('enrol/database:config', $context)) {
|
||||
if (!has_capability('enrol/ldap:config', $context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user