[Fusionforge-commits] r8880 - trunk/gforge/www/docman

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Fri Feb 26 13:39:04 CET 2010


Author: nerville
Date: 2010-02-26 13:39:03 +0100 (Fri, 26 Feb 2010)
New Revision: 8880

Modified:
   trunk/gforge/www/docman/new.php
Log:
clear feedback in case read/post rights

Modified: trunk/gforge/www/docman/new.php
===================================================================
--- trunk/gforge/www/docman/new.php	2010-02-26 10:58:07 UTC (rev 8879)
+++ trunk/gforge/www/docman/new.php	2010-02-26 12:39:03 UTC (rev 8880)
@@ -109,8 +109,15 @@
 			//release the cookie for the document contents (should expire at the end of the session anyway)
 			setcookie ("gforgecurrentdocdata", "", time() - 3600);
 		}
-		Header('Location: '.util_make_url('/docman/?group_id='.$group_id.'&feedback='._('Document submitted sucessfully')));
-		exit;
+		// check if the user is docman's admin
+                $perm =& $g->getPermission( session_get_user() );
+                if (!$perm || $perm->isError() || !$perm->isDocEditor()) {
+			Header('Location: '.util_make_url('/docman/?group_id='.$group_id.'&feedback='._('Document submitted sucessfully : pending state (need validation)')));
+                        exit;
+                } else {
+			Header('Location: '.util_make_url('/docman/?group_id='.$group_id.'&feedback='._('Document submitted sucessfully')));
+			exit;
+		}
 	}
 
 } else {




More information about the Fusionforge-commits mailing list