mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Global options can not be edited by non admin users anymore.
This commit is contained in:
parent
662f7e3635
commit
4f339b3e0e
@ -55,15 +55,17 @@ InitFilterHelpers(); // Helpers for frontend filtering!
|
||||
// Init admin langauge file now!
|
||||
IncludeLanguageFile( $gl_root_path . '/lang/' . $LANG . '/admin.php' );
|
||||
|
||||
// --- Define Extra Stylesheet!
|
||||
//$content['EXTRA_STYLESHEET'] = '<link rel="stylesheet" href="css/highlight.css" type="text/css">' . "\r\n";
|
||||
//$content['EXTRA_STYLESHEET'] .= '<link rel="stylesheet" href="css/menu.css" type="text/css">';
|
||||
// ---
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
|
||||
// Check for changes first
|
||||
if ( isset($_POST['op']) )
|
||||
if ( isset($_SESSION['SESSION_ISADMIN']) && $_SESSION['SESSION_ISADMIN'] == 1 )
|
||||
$content['EditAllowed'] = true;
|
||||
else
|
||||
$content['EditAllowed'] = false;
|
||||
|
||||
|
||||
|
||||
// Check for changes first | Abort if Edit is not allowed
|
||||
if ( isset($_POST['op']) && $content['EditAllowed'] )
|
||||
{
|
||||
if ( $_POST['op'] == "edit" )
|
||||
{
|
||||
@ -135,8 +137,6 @@ if ($content['MiscShowDebugGridCounter'] == 1) { $content['MiscShowDebugGridCoun
|
||||
if ($content['MiscShowPageRenderStats'] == 1) { $content['MiscShowPageRenderStats_checked'] = "checked"; } else { $content['MiscShowPageRenderStats_checked'] = ""; }
|
||||
if ($content['MiscEnableGzipCompression'] == 1) { $content['MiscEnableGzipCompression_checked'] = "checked"; } else { $content['MiscEnableGzipCompression_checked'] = ""; }
|
||||
if ($content['DebugUserLogin'] == 1) { $content['DebugUserLogin_checked'] = "checked"; } else { $content['DebugUserLogin_checked'] = ""; }
|
||||
|
||||
|
||||
// ---
|
||||
|
||||
// --- BEGIN CREATE TITLE
|
||||
|
@ -51,13 +51,14 @@ $content['LN_GEN_GROUPONLYNAME'] = "Group '%1'";
|
||||
|
||||
|
||||
// General Options
|
||||
$content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options";
|
||||
$content['LN_ADMIN_USERFRONTEND'] = "User specific frontend options";
|
||||
$content['LN_ADMIN_MISC'] = "Miscellaneous Options";
|
||||
$content['LN_GEN_SHOWDEBUGMSG'] = "Show Debug messages";
|
||||
$content['LN_GEN_DEBUGGRIDCOUNTER'] = "Show Debug Gridcounter";
|
||||
$content['LN_GEN_SHOWPAGERENDERSTATS'] = "Show Pagerenderstats";
|
||||
$content['LN_GEN_ENABLEGZIP'] = "Enable GZIP Compressed Output";
|
||||
$content['LN_GEN_DEBUGUSERLOGIN'] = "Debug Userlogin";
|
||||
$content['LN_ADMIN_FRONTEND'] = "Frontend Options";
|
||||
$content['LN_GEN_WEBSTYLE'] = "Default selected style";
|
||||
$content['LN_GEN_SELLANGUAGE'] = "Default selected language";
|
||||
$content['LN_GEN_PREPENDTITLE'] = "Prepend this string in title";
|
||||
@ -73,7 +74,7 @@ $content['LN_GEN_SUCCESSFULLYSAVED'] = "The configuration Values have been succe
|
||||
$content['LN_GEN_INTERNAL'] = "Internal";
|
||||
$content['LN_GEN_DISABLED'] = "Function disabled";
|
||||
$content['LN_GEN_CONFIGFILE'] = "Configuration File";
|
||||
$content['LN_GEN_'] = "";
|
||||
$content['LN_GEN_ACCESSDENIED'] = "Access denied to this function";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -12,7 +12,7 @@
|
||||
<table border="0" cellpadding="1" cellspacing="1" bgcolor="#DDDDDD" width="600" align="center">
|
||||
<tr>
|
||||
<td colspan="2" align="center" valign="top" class="title">
|
||||
<strong>{LN_ADMIN_FRONTEND}</strong></td>
|
||||
<strong>{LN_ADMIN_GLOBFRONTEND}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" class="cellmenu1" width="250" nowrap><b>{LN_GEN_WEBSTYLE}</b></td>
|
||||
@ -95,11 +95,16 @@
|
||||
<td align="left" class="cellmenu1" nowrap><b>{LN_GEN_DEBUGUSERLOGIN}</b></td>
|
||||
<td align="right" class="line1" ><input type="checkbox" name="DebugUserLogin" value="yes" {DebugUserLogin_checked}></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<!-- IF EditAllowed="true" -->
|
||||
<input type="submit" value="{LN_ADMIN_SEND}">
|
||||
<input type="hidden" name="op" value="edit">
|
||||
<!-- ENDIF EditAllowed="true" -->
|
||||
<!-- IF EditAllowed!="true" -->
|
||||
<input type="submit" value="{LN_GEN_ACCESSDENIED}" disabled>
|
||||
<!-- ENDIF EditAllowed!="true" -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user