[geeklog-cvs] Geeklog-1.x/plugins/staticpages services.inc.php, 1.4, 1.5
Dirk Haun
dhaun at qs1489.pair.com
Mon Sep 17 14:12:31 EDT 2007
Update of /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages
In directory qs1489.pair.com:/tmp/cvs-serv55622/plugins/staticpages
Modified Files:
services.inc.php
Log Message:
Check for 'staticpages.edit' permissions much earlier (helps with appfs which tries to post the static page without logging in first ...)
Index: services.inc.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/plugins/staticpages/services.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** services.inc.php 8 Sep 2007 21:19:43 -0000 1.4
--- services.inc.php 17 Sep 2007 18:12:28 -0000 1.5
***************
*** 51,54 ****
--- 51,65 ----
$output = '';
+ if (!SEC_hasRights('staticpages.edit')) {
+ $output = COM_siteHeader('menu', $LANG_STATIC['access_denied']);
+ $output .= COM_startBlock($LANG_STATIC['access_denied'], '',
+ COM_getBlockTemplate('_msg_block', 'header'));
+ $output .= $LANG_STATIC['access_denied_msg'];
+ $output .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
+ $output .= COM_siteFooter();
+
+ return PLG_RET_AUTH_FAILED;
+ }
+
// TEST CODE
/*
***************
*** 229,245 ****
return PLG_RET_ERROR;
}
- }
-
- if (!SEC_hasRights ('staticpages.edit')) {
- $output = COM_siteHeader ('menu', $LANG_STATIC['access_denied']);
- $output .= COM_startBlock ($LANG_STATIC['access_denied'], '',
- COM_getBlockTemplate ('_msg_block', 'header'));
- $output .= $LANG_STATIC['access_denied_msg'];
- $output .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
- $output .= COM_siteFooter ();
- if ($_USER['uid'] > 1)
- return PLG_RET_PERMISSION_DENIED;
- else
- return PLG_RET_AUTH_FAILED;
}
--- 240,243 ----
More information about the geeklog-cvs
mailing list