MDL-11511, two new caps are introduced, see tracker, merged from MOODLE_19_STABLE
This commit is contained in:
+8
-2
@@ -81,8 +81,14 @@
|
||||
}
|
||||
|
||||
if ($rid) { // So do you have access?
|
||||
if (!(has_capability('mod/data:manageentries', $context) or data_isowner($rid)) or !confirm_sesskey() ) {
|
||||
print_error('noaccess','data');
|
||||
if (!confirm_sesskey()) {
|
||||
print_error('confirmsesskeybad', 'error');
|
||||
}
|
||||
|
||||
if (data_isowner($rid)){
|
||||
require_capability('mod/data:editownentries', $context);
|
||||
}else{
|
||||
require_capability('mod/data:manageentries', $context);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user