Commit e8cb180e authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review
Browse files

Merge "Bug 1849395: Doublecheck details values for modal"

parents 233c32d2 9ef9014a
......@@ -23,10 +23,16 @@ $artefactid = param_integer('artefactid');
if (!can_view_view($viewid)) {
json_reply('local', get_string('accessdenied', 'error'));
}
if (!artefact_in_view($artefactid, $viewid)) {
json_reply('local', get_string('accessdenied', 'error'));
}
$html = '';
if ($blockid) {
$block = new BlockInstance($blockid);
if ((int)$block->get('view') !== $viewid) {
json_reply('local', get_string('accessdenied', 'error'));
}
$view = $block->get_view();
$artefact = $block->get_artefact_instance($artefactid);
}
......@@ -35,6 +41,10 @@ else {
$view = new View($viewid);
}
if ($USER->has_peer_role_only($view)) {
json_reply('local', get_string('accessdenied', 'error'));
}
// Render the artefact
$options = array(
'viewid' => $viewid,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment