[Fusionforge-commits] FusionForge branch 6.1 updated. v6.1-2-g13e4811

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Nov 4 17:54:22 CET 2018


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, 6.1 has been updated
       via  13e481181bc4b4d29e54f004e8aa4c3ceb66c14a (commit)
      from  b52d6dd44bcf9b73cb439f93aa3a32c511a9ed66 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=13e481181bc4b4d29e54f004e8aa4c3ceb66c14a

commit 13e481181bc4b4d29e54f004e8aa4c3ceb66c14a
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Nov 4 17:54:17 2018 +0100

    fix owner test on user widget layout. Be sure that the user is the owner of the layout to update

diff --git a/src/CHANGES b/src/CHANGES
index 894878d..f252867 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -1,3 +1,6 @@
+FusionForge 6.1.1:
+* Widget User Page: fix owner test to ensure the user is the owner of the layout.
+
 FusionForge 6.1:
 * Accounts: minimum password length is now 8 (Sylvain Beucler)
 * Accounts: add minimal constraints to password (upper-case, lower-case, non-alphanumeric check) [#826] (Inria)
diff --git a/src/www/widgets/widgets.php b/src/www/widgets/widgets.php
index 9768674..7d49ff8 100644
--- a/src/www/widgets/widgets.php
+++ b/src/www/widgets/widgets.php
@@ -1,7 +1,7 @@
 <?php
 /**
  *
- * Copyright 2011-2014,2016, Franck Villaume - TrivialDev
+ * Copyright 2011-2014,2016,2018, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -48,12 +48,13 @@ if (session_loggedin()) {
 			$owner_type = substr($owner, 0, 1);
 			switch($owner_type) {
 				case WidgetLayoutManager::OWNER_TYPE_USER:
-					$owner_id = user_getid();
-					$userm = UserManager::instance();
-					$current = $userm->getCurrentUser();
-					site_user_header(array('title'=>sprintf(_('Personal Page for %s'), user_getname())));
-					$lm->displayAvailableWidgets(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER, $layout_id);
-					site_footer();
+					if ($owner_id == user_getid()) {
+						$userm = UserManager::instance();
+						$current = $userm->getCurrentUser();
+						site_user_header(array('title'=>sprintf(_('Personal Page for %s'), user_getname())));
+						$lm->displayAvailableWidgets(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER, $layout_id);
+						site_footer();
+					}
 					break;
 				case WidgetLayoutManager::OWNER_TYPE_GROUP:
 					$pm = ProjectManager::instance();

-----------------------------------------------------------------------

Summary of changes:
 src/CHANGES                 |  3 +++
 src/www/widgets/widgets.php | 15 ++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list