MDL-52993 wiki: Fix wiki_user_can_edit for collab and separate groups

This commit is contained in:
Dani Palou
2016-02-16 16:42:46 +01:00
committed by Eloy Lafuente (stronk7)
parent 60a26ddf42
commit 5d14c00774
+1 -1
View File
@@ -908,7 +908,7 @@ function wiki_user_can_edit($subwiki) {
// There is one wiki per group.
//
// Only members of subwiki group could edit that wiki
if ($subwiki->groupid == groups_get_activity_group($cm)) {
if (groups_is_member($subwiki->groupid)) {
// Only edit capability needed
return has_capability('mod/wiki:editpage', $context);
} else { // User is not part of that group