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: 2013-10-26
Index: collabtive/include/initfunctions.php
===================================================================
--- collabtive.orig/include/initfunctions.php	2014-01-19 14:11:13.000000000 -0600
+++ collabtive/include/initfunctions.php	2014-01-19 14:11:46.000000000 -0600
@@ -21,6 +21,14 @@
     if ($chk != "") {
         return true;
     } 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;
     }
 }
