Commit 9a8344b7 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1688165: Checking if user can view group hompage for embedded images"

parents 559905de 4dc2d489
......@@ -141,8 +141,10 @@ else {
if (!$imagevisible && $groupid) {
// check for public embedded image
if (!group_user_access($groupid)){
// Check if group description is viewable
$view = group_get_homepage_view($groupid);
if (!can_view_view($view->get('id'))) {
throw new AccessDeniedException(get_string('accessdenied', 'error'));
$imagevisible = EmbeddedImage::can_see_embedded_image($fileid, 'group', $groupid);
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