Commit 6c123cea authored by Robert Lyon's avatar Robert Lyon
Browse files

Group admin of no institution was unable to update group (Bug #1420590)



It was wanting to check if the user was in the correct institution to
edit the group - but was wailing if the user was in group 'mahara' or
no institution.

Change-Id: Ia77cb601774bdde6a2a176a0ed26760e4ccd8ea8
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 5453e437
......@@ -79,7 +79,7 @@ function pieform_element_wysiwyg_rule_required(Pieform $form, $value, $element,
function pieform_element_wysiwyg_get_headdata() {
global $_PIEFORM_WYSIWYGS;
if (is_html_editor_enabled()) {
if (is_html_editor_enabled() && !empty($_PIEFORM_WYSIWYGS)) {
$result = '<script type="text/javascript">'
. "\nvar editor_to_focus;"
. "\nPieformManager.connect('onsubmit', null, tinyMCE.triggerSave);"
......
......@@ -544,7 +544,7 @@ function group_update($new, $create=false) {
throw new NotFoundException("group_update: group not found");
}
if (!empty($old->institution)) {
if (!empty($old->institution) && $old->institution != 'mahara') {
// Api-controlled group; check permissions.
global $USER;
......
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