Description: Allow administrative users to edit any project
 Without this patch, all projects are listed, but clicking on any of
 them yields a "not your project" access denied error.
Author: Gunnar Wolf <gwolf@debian.org>
Forwarded: http://collabtive.o-dyn.de/forum/viewtopic.php?f=10&t=6537
Last-update:2011-01-25
Index: collabtive-0.6.5/include/initfunctions.php
===================================================================
--- collabtive-0.6.5.orig/include/initfunctions.php	2011-01-25 13:44:17.000000000 -0600
+++ collabtive-0.6.5/include/initfunctions.php	2011-01-25 14:39:21.000000000 -0600
@@ -26,6 +26,14 @@
     }
     else
     {
+        $role = (int) $user;
+        $sel = @mysql_query("SELECT admin FROM roles WHERE ID = $role");
+	$chk = @mysql_fetch_row($sel);
+	$adm = unserialize($chk[0]);
+	if ($adm["add"]) 
+	{
+	    return true;
+	}
         return false;
     }
 }
