4 * Copyright 2010 Roland Mas
6 * This file is part of FusionForge. FusionForge is free software;
7 * you can redistribute it and/or modify it under the terms of the
8 * GNU General Public License as published by the Free Software
9 * Foundation; either version 2 of the Licence, or (at your option)
12 * FusionForge is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 require (dirname(__FILE__).'/../common/include/env.inc.php');
23 require_once $gfcommon.'include/pre.php';
28 require_once 'common/include/Plugin.class.php';
29 require_once 'common/include/PluginManager.class.php';
31 setup_plugin_manager () ;
32 session_set_admin () ;
34 $res = db_query_params ('SELECT role_id FROM pfo_role ORDER BY role_id',
37 $rows=db_numrows($res);
39 for ($i=0; $i<$rows; $i++) {
40 $role = RBACEngine::getInstance()->getRoleById (db_result($res,$i,'role_id')) ;
41 echo "Normalizing role ".$role->getDisplayableName()."\n" ;
43 $role->normalizeData() ;