Can't copy group created by CSV when not an admin

Bug #1658393 reported by Kristina Hoeppner on 2017-01-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Unassigned
16.10
Medium
Unassigned
17.04
Medium
Unassigned
17.10
Medium
Unassigned

Bug Description

Mahara 16.10+

This bug is related to bug #1658389 and should be fixed along with it.

In 16.10 we added the possibility to copy a group and also manage all groups via CSV file. Institution and site admins can copy a group without problems, but an institution member that doesn't have the institution admin role cannot copy a group created within an institution and only sees an error message.

To replicate:

1. Create institution "uni" and create 3 users in it: One institution admin "InstAdmin", one a regular member "User", one a staff member "Staff".
2. As institution or site admin create the group "Practicum uni" in the institution "uni" via CSV.
3. As institution or site admin create the group "support" manually (NOT via CSV).
3. Assign both "InstAdmin" and "User" as group admins to the groups "Practicum uni" and "Support".
4. Under Configure site -> Site options -> Group settings make sure that "Create group" is set to "Everyone.
3. Log in as "User".
4. Click the "Copy" button on group "Practicum uni". Expected result: The user can copy the group as he has group creation permissions. Actual result: But he gets the error message that he can't create a group in the institution.
5. Click the "Copy" button on group "Support". Expected and actual result: The user can copy the group.
6. Log in as "Staff".
7. Click the "Copy" button on group "Practicum uni". Expected result: The user can copy the group as he has group creation permissions. Actual result: But he gets the error message that he can't create a group in the institution.
8. Click the "Copy" button on group "Support". Expected and actual result: The user can copy the group.
9. Log in as "InstAdmin".
10. Click the "Copy" button on group "Practicum uni". Expected and actual result: The institution admin can copy the group.
11. Click the "Copy" button on group "Support". Expected and actual result: The institution admin can copy the group.
12. Repeat with the other two "Create group" options.

Institution admins can copy a CSV file created group in their institution because they can also do so in the administration area. The other two roles, users and staff cannot. They can only copy groups that are in "No institution" even when they have group copying permissions.

If the group admin is not a member of the institution to which the group is associated, he should still be able to make a copy of the group because we do not differentiate which groups people can copy on the site level. So that would also need to be tested for.

Robert Lyon (robertl-9) on 2017-03-28
Changed in mahara:
milestone: 17.04.0 → 17.04.1

Reviewed: https://reviews.mahara.org/7665
Committed: https://git.mahara.org/mahara/mahara/commit/0524e22037f108949c19eb23570680354e56f402
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 0524e22037f108949c19eb23570680354e56f402
Author: Robert Lyon <email address hidden>
Date: Fri Apr 21 09:03:05 2017 +1200

Bug 1658393: Respect group copying rules

When copying (therefore creating) a group owned by an institution
we check if user can edit institution - if not we set institution
to 'mahara'

behatnotneeded

Change-Id: I648d74a70016d4b68e738147cc63952ec8261926
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/7684
Committed: https://git.mahara.org/mahara/mahara/commit/dc254bca127f129e6340e2b408e6aa0300b0bd78
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit dc254bca127f129e6340e2b408e6aa0300b0bd78
Author: Robert Lyon <email address hidden>
Date: Fri Apr 21 09:03:05 2017 +1200

Bug 1658393: Respect group copying rules

When copying (therefore creating) a group owned by an institution
we check if user can edit institution - if not we set institution
to 'mahara'

behatnotneeded

Change-Id: I648d74a70016d4b68e738147cc63952ec8261926
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 0524e22037f108949c19eb23570680354e56f402)

Reviewed: https://reviews.mahara.org/7685
Committed: https://git.mahara.org/mahara/mahara/commit/00f56a20fec562c9989729de6ca462afd9543c0b
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 00f56a20fec562c9989729de6ca462afd9543c0b
Author: Robert Lyon <email address hidden>
Date: Fri Apr 21 09:03:05 2017 +1200

Bug 1658393: Respect group copying rules

When copying (therefore creating) a group owned by an institution
we check if user can edit institution - if not we set institution
to 'mahara'

behatnotneeded

Change-Id: I648d74a70016d4b68e738147cc63952ec8261926
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 0524e22037f108949c19eb23570680354e56f402)
(cherry picked from commit dc254bca127f129e6340e2b408e6aa0300b0bd78)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers