Commit 2fe347c0 authored by Robert Lyon's avatar Robert Lyon

Allowing non-institution site admins to publish (bug #1255361)

Currently, if a site admin tries to edit an institution page and
attach a file to a block (eg image block) and they don't belong to
that institution, the process fails.

Have altered the can_publish_artefact() to allow those that can edit
institutions to be allowed to also publish.

Change-Id: I05a2160e84814add067019e4bde654a6ebd561b1
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent aa0dd863
......@@ -1032,7 +1032,7 @@ class User {
if ($i == 'mahara') {
return $this->get('admin');
return $this->in_institution($i);
return $this->in_institution($i) || $this->can_edit_institution($i);
if (!$group = $a->get('group')) {
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