Commit 9ef9014a authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1849395: Doublecheck details values for modal



Before displaying content

behatnotneeded

Change-Id: Ibdd0b33d543f65cf619fc5a061b6f81350d1d94a
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c650b1bb
......@@ -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