File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1728,11 +1728,22 @@ public function canCloseDiscussion($discussion) {
1728
1728
}
1729
1729
1730
1730
/**
1731
- * Check move group discusion permission
1731
+ * Check move group discussion permission
1732
1732
*
1733
1733
*/
1734
1734
public function canMoveDiscussion ($ discussion ) {
1735
- // Don't move any discussions
1735
+ if ($ this ->canEditDiscussion ($ discussion ) && Gdn::session ()->checkPermission ('Garden.Moderation.Manage ' )) {
1736
+ return true ;
1737
+ }
1738
+
1739
+ $ groupID = $ this ->findGroupIDFromDiscussion ($ discussion );
1740
+ $ group = $ this ->getByGroupID ($ groupID );
1741
+ $ result = $ this ->getGroupRoleFor (Gdn::session ()->UserID , $ groupID );
1742
+ $ groupRole = val ('Role ' , $ result , null );
1743
+ if ($ groupRole === GroupModel::ROLE_LEADER || Gdn::session ()->UserID === $ group ->OwnerID
1744
+ || Gdn::session ()->checkPermission (GroupsPlugin::GROUPS_MODERATION_MANAGE_PERMISSION )) {
1745
+ return true ;
1746
+ }
1736
1747
return false ;
1737
1748
}
1738
1749
You can’t perform that action at this time.
0 commit comments