[Fusionforge-commits] r12617 - trunk/src/common/include

Olivier Berger olberger at fusionforge.org
Tue Mar 8 18:44:08 CET 2011


Author: olberger
Date: 2011-03-08 18:43:54 +0100 (Tue, 08 Mar 2011)
New Revision: 12617

Modified:
   trunk/src/common/include/PFO-RBAC.interface.php
   trunk/src/common/include/RBACEngine.class.php
Log:
More docstrings


Modified: trunk/src/common/include/PFO-RBAC.interface.php
===================================================================
--- trunk/src/common/include/PFO-RBAC.interface.php	2011-03-08 17:43:18 UTC (rev 12616)
+++ trunk/src/common/include/PFO-RBAC.interface.php	2011-03-08 17:43:54 UTC (rev 12617)
@@ -50,6 +50,12 @@
 	 * returns roles available to the user in the current session
 	 */
 	public function getAvailableRoles() ; // From session
+	/**
+	 * TODO Enter description here ...
+	 * @param string $section
+	 * @param unknown_type $reference group_id, ...
+	 * @param string $action
+	 */
 	public function isActionAllowed($section, $reference, $action = NULL) ;
 	public function isGlobalActionAllowed($section, $action = NULL) ;
 	public function isActionAllowedForUser($user, $section, $reference, $action = NULL) ;

Modified: trunk/src/common/include/RBACEngine.class.php
===================================================================
--- trunk/src/common/include/RBACEngine.class.php	2011-03-08 17:43:18 UTC (rev 12616)
+++ trunk/src/common/include/RBACEngine.class.php	2011-03-08 17:43:54 UTC (rev 12617)
@@ -143,6 +143,9 @@
 		return $result ;
 	}
 
+	/* (non-PHPdoc)
+	 * @see PFO_RBACEngine::isActionAllowed()
+	 */
 	public function isActionAllowed ($section, $reference, $action = NULL) {
 		$rlist = $this->getAvailableRoles () ;
 		foreach ($rlist as $r) {
@@ -429,6 +432,12 @@
 	}
 }
 
+/**
+ * Check if permission is allowed for an action on a reference in the context of a section
+ * @param string $section
+ * @param unknown_type $reference (group_id, ...)
+ * @param string $action
+ */
 function forge_check_perm ($section, $reference, $action = NULL) {
 	$engine = RBACEngine::getInstance() ;
 




More information about the Fusionforge-commits mailing list