access denied error when editing group as group admin

Bug #1420590 reported by Robert Lyon on 2015-02-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
1.10
High
Unassigned
1.9
High
Unassigned
15.04
High
Robert Lyon
15.10
High
Unassigned

Bug Description

Get a:

You do not have access to view this page.

group_update: cannot update a group in this institution

error - this is due a group admin that is only in the 'no insitituion' (mahara) institution doesn't have the expected info set in their $USER data.

So need to make an exception for the 'mahara' institution.

Robert Lyon (robertl-9) on 2015-03-01
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
Robert Lyon (robertl-9) on 2015-03-01
Changed in mahara:
status: Confirmed → In Progress
Robert Lyon (robertl-9) on 2015-03-01
summary: - undefined 'form' error when embedding a group image
+ access denied error when editing group as group admin
description: updated

Hello Robert,

Can you please provide the test scenario? Does that only happen with groups that were created by CSV file and thus are somewhat associated with institutions?

Thanks
Kristina

Robert Lyon (robertl-9) wrote :

For testing:

1) create a groups.csv file for uploading groups via csv - eg:

shortname,displayname,roles,editroles
groupone,Group One,standard,admin
grouptwo,Group Two,standard,all

2) make sure when you upload the groups that the institution is set to 'no institution'

3) create a groupmembers.csv file for updating group members for the groups you just made - eg:

shortname,username,role
mygroupone,test01,admin
mygrouptwo,test02,admin

4) log into the site as the user, eg test01 and go and edit the group - update the description field

5) On save you should get:

[WAR] bc (lib/form/elements/wysiwyg.php:87) Invalid argument supplied for foreach()

Son Nguyen (ngson2000) wrote :

This bug also happens for 1.9 and 1.10

Son Nguyen (ngson2000) wrote :

Warning message I got for 1.9:

[WAR] b6 (lib/form/elements/wysiwyg.php:87) Invalid argument supplied for foreach()
Call stack (most recent first):
log_message("Invalid argument supplied for foreach()", 8, true, true, "/home/sonn/code/mahara/1.9/htdocs/lib/form/element...", 87) at /home/sonn/code/mahara/1.9/htdocs/lib/errors.php:439
error(2, "Invalid argument supplied for foreach()", "/home/sonn/code/mahara/1.9/htdocs/lib/form/element...", 87, array(size 2)) at /home/sonn/code/mahara/1.9/htdocs/lib/form/elements/wysiwyg.php:87
pieform_element_wysiwyg_get_headdata(array(size 8)) at /home/sonn/code/mahara/1.9/htdocs/lib/pieforms/pieform.php:1725
pieform_get_headdata() at /home/sonn/code/mahara/1.9/htdocs/lib/web.php:92
smarty(array(size 0), array(size 0), array(size 0), array(size 1)) at /home/sonn/code/mahara/1.9/htdocs/lib/errors.php:574
MaharaException->handle_exception() at /home/sonn/code/mahara/1.9/htdocs/lib/errors.php:465
exception(object(AccessDeniedException)) at Unknown:0

Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/4379

Aaron Wells (u-aaronw) on 2015-04-16
Changed in mahara:
milestone: 15.04.0 → 15.04.1
tags: added: behat has-behat

Reviewed: https://reviews.mahara.org/4330
Committed: http://gitorious.org/mahara/mahara/commit/0f0b141da2344c720c07f9f7b648bf90f6872918
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 0f0b141da2344c720c07f9f7b648bf90f6872918
Author: Robert Lyon <email address hidden>
Date: Mon Mar 2 10:00:28 2015 +1300

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 <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4379
Committed: http://gitorious.org/mahara/mahara/commit/b70cb8decf9a8ecca7cf642eb40d3a177a43f4dd
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit b70cb8decf9a8ecca7cf642eb40d3a177a43f4dd
Author: Jinelle Foley-Barnes <email address hidden>
Date: Thu Mar 12 14:26:58 2015 +1300

Behat Test: Uploading groups via CSV (Bug 1420590)

Change-Id: I4fb780ac88dbaa9c353f9a558ee64d256d978735

Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/4752

Mahara Bot (dev-mahara) wrote :

Patch for "1.9_STABLE" branch: https://reviews.mahara.org/4753

Reviewed: https://reviews.mahara.org/4753
Committed: http://gitorious.org/mahara/mahara/commit/6c123cea715d7cfad4084ec63f86e584ce06f2c8
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.9_STABLE

commit 6c123cea715d7cfad4084ec63f86e584ce06f2c8
Author: Robert Lyon <email address hidden>
Date: Mon Mar 2 10:00:28 2015 +1300

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 <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4752
Committed: http://gitorious.org/mahara/mahara/commit/e482628fe7b24aa33995ad8d7ec90c2e04f3fc35
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit e482628fe7b24aa33995ad8d7ec90c2e04f3fc35
Author: Robert Lyon <email address hidden>
Date: Mon Mar 2 10:00:28 2015 +1300

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 <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4751
Committed: http://gitorious.org/mahara/mahara/commit/0576e759c3303320325338caa8bcd231672142ee
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 0576e759c3303320325338caa8bcd231672142ee
Author: Robert Lyon <email address hidden>
Date: Mon Mar 2 10:00:28 2015 +1300

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 <email address hidden>

Robert Lyon (robertl-9) on 2016-11-06
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers