[Fusionforge-commits] FusionForge branch Branch_5_3 updated. d63db37f5ce2316be16c0f98d1142c110e119e8f
Franck VILLAUME
nerville at fusionforge.org
Wed Feb 5 10:09:42 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, Branch_5_3 has been updated
via d63db37f5ce2316be16c0f98d1142c110e119e8f (commit)
from fe025fe941ced6d7b7f79ef2326d629c9f82542b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d63db37f5ce2316be16c0f98d1142c110e119e8f
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Wed Feb 5 10:08:45 2014 +0100
plugin projects hierarchy: fix display for private projects
diff --git a/src/plugins/projects-hierarchy/view/home_project_link.php b/src/plugins/projects-hierarchy/view/home_project_link.php
index ed1d94c..9b0c893 100644
--- a/src/plugins/projects-hierarchy/view/home_project_link.php
+++ b/src/plugins/projects-hierarchy/view/home_project_link.php
@@ -5,6 +5,7 @@
* Copyright 2006 (c) Fabien Regnier - Sogeti
* Copyright 2010-2011, Franck Villaume - Capgemini
* Copyright 2013, French Ministry of Education
+ * Copyright 2014, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
@@ -29,6 +30,22 @@ $projectsHierarchy = plugin_get_object('projects-hierarchy');
$parent = $projectsHierarchy->getFamily($group_id, 'parent', false, 'validated');
$childs = $projectsHierarchy->getFamily($group_id, 'child', false, 'validated');
+
+if (sizeof($parent)) {
+ $parentGroup = group_get_object($parent[0]);
+ if (!forge_check_perm('project_read', $parentGroup->getID())) {
+ array_pop($parent);
+ }
+}
+if (sizeof($childs)) {
+ for ($i = 0; $i < count($childs); $i++) {
+ $childGroup = group_get_object($childs[$i]);
+ if (!forge_check_perm('project_read', $childGroup->getID())) {
+ unset($childs[$i]);
+ }
+ }
+ $childs = array_values($childs);
+}
if (sizeof($parent) || sizeof($childs)) {
echo $HTML->boxTop(_('Linked projects'));
if (sizeof($parent)) {
-----------------------------------------------------------------------
Summary of changes:
.../projects-hierarchy/view/home_project_link.php | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list