[Fusionforge-commits] r10534 - trunk/src/common/include
Roland Mas
lolando at libremir.placard.fr.eu.org
Fri Sep 17 17:41:59 CEST 2010
Author: lolando
Date: 2010-09-17 17:41:59 +0200 (Fri, 17 Sep 2010)
New Revision: 10534
Modified:
trunk/src/common/include/Plugin.class.php
trunk/src/common/include/RBAC.php
Log:
RBAC system fixes
Modified: trunk/src/common/include/Plugin.class.php
===================================================================
--- trunk/src/common/include/Plugin.class.php 2010-09-17 15:38:42 UTC (rev 10533)
+++ trunk/src/common/include/Plugin.class.php 2010-09-17 15:41:59 UTC (rev 10534)
@@ -195,7 +195,7 @@
$this->role->role_values = array_replace_recursive ($this->role->role_values,
array ($this->name => $values)) ;
if ($this->global) {
- $this->role->global_values[] = $this->name ;
+ $this->role->global_settings[] = $this->name ;
}
}
Modified: trunk/src/common/include/RBAC.php
===================================================================
--- trunk/src/common/include/RBAC.php 2010-09-17 15:38:42 UTC (rev 10533)
+++ trunk/src/common/include/RBAC.php 2010-09-17 15:41:59 UTC (rev 10534)
@@ -262,7 +262,7 @@
$ids[] = $hp->getID() ;
}
- $res = db_query_params ('SELECT group_id FROM pfo_role_project_refs WHERE role_id=$1',
+ $res = db_query_params ('SELECT group_id FROM role_project_refs WHERE role_id=$1',
array ($this->getID())) ;
if ($res) {
while ($arr = db_fetch_array ($res)) {
@@ -481,9 +481,11 @@
$group_id = $project->getID() ;
if (USE_PFO_RBAC) {
- $sections = array ('project_read', 'project_admin', 'frs', 'scm', 'docman', 'tracker_admin', 'new_tracker', 'forum_admin', 'new_forum', 'pm_admin', 'new_pm', 'webcal') ;
+ $sections = array_keys ($this->role_values) ;
foreach ($sections as $section) {
- $result[$section][$group_id] = $this->getVal ($section, $group_id) ;
+ if (!in_array ($section, $this->global_settings)) {
+ $result[$section][$group_id] = $this->getVal ($section, $group_id) ;
+ }
}
} else {
$sections = array ('projectadmin', 'frs', 'scm', 'docman', 'trackeradmin', 'newtracker', 'forumadmin', 'newforum', 'pmadmin', 'newpm', 'webcal') ;
@@ -514,7 +516,6 @@
}
function getSetting($section, $reference) {
- $result = 0 ;
if (isset ($this->perms_array[$section][$reference])) {
$value = $this->perms_array[$section][$reference] ;
} else {
More information about the Fusionforge-commits
mailing list