[Fusionforge-commits] r15044 - in branches/Branch_5_1: . src/common/widget src/www/widgets
Roland Mas
lolando at fusionforge.org
Mon Jan 30 15:43:33 CET 2012
Author: lolando
Date: 2012-01-30 15:43:32 +0100 (Mon, 30 Jan 2012)
New Revision: 15044
Modified:
branches/Branch_5_1/
branches/Branch_5_1/src/common/widget/WidgetLayoutManager.class.php
branches/Branch_5_1/src/www/widgets/updatelayout.php
Log:
Merged from Evolvis: Update of project Summary widgets is now only possible for project admins
Modified: branches/Branch_5_1/src/common/widget/WidgetLayoutManager.class.php
===================================================================
--- branches/Branch_5_1/src/common/widget/WidgetLayoutManager.class.php 2012-01-29 18:32:14 UTC (rev 15043)
+++ branches/Branch_5_1/src/common/widget/WidgetLayoutManager.class.php 2012-01-30 14:43:32 UTC (rev 15044)
@@ -115,7 +115,7 @@
}
break;
case self::OWNER_TYPE_GROUP:
- if (UserManager::instance()->getCurrentUser()->is_super_user==true || user_ismember($request->get('group_id'), 'A')) { //Only project admin
+ if (forge_check_perm('project_admin', $owner_id, NULL)) { //Only project admin
$readonly = false;
}
break;
Modified: branches/Branch_5_1/src/www/widgets/updatelayout.php
===================================================================
--- branches/Branch_5_1/src/www/widgets/updatelayout.php 2012-01-29 18:32:14 UTC (rev 15043)
+++ branches/Branch_5_1/src/www/widgets/updatelayout.php 2012-01-30 14:43:32 UTC (rev 15044)
@@ -75,7 +75,9 @@
switch($action) {
case 'remove':
$instance_id = (int)$param[$name][$action];
- $lm->removeWidget($owner_id, $owner_type, $layout_id, $name, $instance_id, $widget);
+ if(forge_check_perm ('project_admin', $owner_id, NULL)) {
+ $lm->removeWidget($owner_id, $owner_type, $layout_id, $name, $instance_id, $widget);
+ }
break;
case 'add':
default:
More information about the Fusionforge-commits
mailing list