[Fusionforge-commits] r15508 - in branches/Branch_5_1/src: packaging/install utils

Thorsten Glaser mirabilos at fusionforge.org
Fri May 11 20:12:30 CEST 2012


Author: mirabilos
Date: 2012-05-11 20:12:28 +0200 (Fri, 11 May 2012)
New Revision: 15508

Added:
   branches/Branch_5_1/src/utils/list-admins.php
Modified:
   branches/Branch_5_1/src/packaging/install/common
Log:
add a small RBAC demo listing the unixnames of all forge admins


Modified: branches/Branch_5_1/src/packaging/install/common
===================================================================
--- branches/Branch_5_1/src/packaging/install/common	2012-05-11 16:40:54 UTC (rev 15507)
+++ branches/Branch_5_1/src/packaging/install/common	2012-05-11 18:12:28 UTC (rev 15508)
@@ -28,3 +28,4 @@
 cronjobs/gather_scm_stats.php          usr/share/@OLDPACKAGE@/cronjobs/
 cronjobs/generate_scm_snapshots.php    usr/share/@OLDPACKAGE@/cronjobs/
 locales/*                              usr/share/locale/
+utils/list-admins.php                  usr/share/@OLDPACKAGE@/bin/

Added: branches/Branch_5_1/src/utils/list-admins.php
===================================================================
--- branches/Branch_5_1/src/utils/list-admins.php	                        (rev 0)
+++ branches/Branch_5_1/src/utils/list-admins.php	2012-05-11 18:12:28 UTC (rev 15508)
@@ -0,0 +1,7 @@
+#!/usr/bin/php -f
+<?php
+require "/usr/share/gforge/common/include/env.inc.php";
+require_once $gfcommon."include/pre.php";
+$admins = RBACEngine::getInstance()->getUsersByAllowedAction("forge_admin", -1);
+$anames = array_map(create_function("\$x", "return \$x->getUnixName();"), $admins);
+sort($anames); echo join(" ", $anames) . "\n";


Property changes on: branches/Branch_5_1/src/utils/list-admins.php
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list