mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Merge branch 'v2-stable' into beta
Conflicts: src/admin/charts.php src/admin/sources.php src/lang/de/admin.php src/lang/en/admin.php src/lang/it_IT/admin.php src/lang/pt_BR/admin.php
This commit is contained in:
commit
4bf70e65d4
@ -69,6 +69,14 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
|
||||
// ---
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
|
||||
// --- Set Helpervariable for non-ADMIN users
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
$content['READONLY_ISUSERONLY'] = "disabled";
|
||||
else
|
||||
$content['READONLY_ISUSERONLY'] = "";
|
||||
// ---
|
||||
|
||||
if ( isset($_GET['op']) )
|
||||
{
|
||||
if ($_GET['op'] == "add")
|
||||
@ -96,6 +104,14 @@ if ( isset($_GET['op']) )
|
||||
$content['userid'] = null;
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
$content['CHARTID'] = "";
|
||||
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -144,11 +160,17 @@ if ( isset($_GET['op']) )
|
||||
CreateChartFields($content['chart_field']);
|
||||
|
||||
// COMMON Fields
|
||||
if ( $myChart['userid'] != null )
|
||||
$content['userid'] = $myChart['userid'];
|
||||
if ( $content['userid'] != null )
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
else
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
|
||||
// --- Can only EDIT own views!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 && $content['userid'] == NULL )
|
||||
DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] );
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
if ( is_array($content['SUBGROUPS']) )
|
||||
@ -248,11 +270,20 @@ if ( isset($_POST['op']) )
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
}
|
||||
|
||||
// --- Check mandotary values
|
||||
|
@ -69,6 +69,14 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
|
||||
// ---
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
|
||||
// --- Set Helpervariable for non-ADMIN users
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
$content['READONLY_ISUSERONLY'] = "disabled";
|
||||
else
|
||||
$content['READONLY_ISUSERONLY'] = "";
|
||||
// ---
|
||||
|
||||
if ( isset($_GET['op']) )
|
||||
{
|
||||
if ($_GET['op'] == "add")
|
||||
@ -86,6 +94,14 @@ if ( isset($_GET['op']) )
|
||||
$content['userid'] = null;
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
$content['SEARCHID'] = "";
|
||||
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -116,11 +132,17 @@ if ( isset($_GET['op']) )
|
||||
{
|
||||
$content['SEARCHID'] = $mysearch['ID'];
|
||||
$content['DisplayName'] = $mysearch['DisplayName'];
|
||||
$content['userid'] = $mysearch['userid'];
|
||||
$content['SearchQuery'] = $mysearch['SearchQuery'];
|
||||
if ( $mysearch['userid'] != null )
|
||||
if ( $content['userid'] != null )
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
else
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
|
||||
// --- Can only EDIT own views!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 && $content['userid'] == NULL )
|
||||
DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] );
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -215,11 +237,20 @@ if ( isset($_POST['op']) )
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
}
|
||||
|
||||
// --- Check mandotary values
|
||||
|
@ -70,6 +70,14 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
|
||||
// ---
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
|
||||
// --- Set Helpervariable for non-ADMIN users
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
$content['READONLY_ISUSERONLY'] = "disabled";
|
||||
else
|
||||
$content['READONLY_ISUSERONLY'] = "";
|
||||
// ---
|
||||
|
||||
if ( isset($_GET['op']) )
|
||||
{
|
||||
if ($_GET['op'] == "add")
|
||||
@ -126,6 +134,14 @@ if ( isset($_GET['op']) )
|
||||
$content['userid'] = null;
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
$content['SOURCEID'] = "";
|
||||
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -211,11 +227,17 @@ if ( isset($_GET['op']) )
|
||||
}
|
||||
$content['SourceDBRecordsPerQuery'] = $mysource['DBRecordsPerQuery'];
|
||||
|
||||
|
||||
if ( $mysource['userid'] != null )
|
||||
// Set UserID if set!
|
||||
$content['userid'] = $mysource['userid'];
|
||||
if ( $content['userid'] != null )
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
else
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
|
||||
// --- Can only EDIT own views!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 && $content['userid'] == NULL )
|
||||
DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] );
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -544,11 +566,20 @@ if ( isset($_POST['op']) )
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
}
|
||||
|
||||
// --- Check mandotary values
|
||||
|
@ -77,6 +77,13 @@ if ( !isset($_SESSION['SESSION_ISREADONLY']) || $_SESSION['SESSION_ISREADONLY']
|
||||
// Init helper variable to empty string
|
||||
$content['FormUrlAddOP'] = "";
|
||||
|
||||
// --- Set Helpervariable for non-ADMIN users
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
$content['READONLY_ISUSERONLY'] = "disabled";
|
||||
else
|
||||
$content['READONLY_ISUSERONLY'] = "";
|
||||
// ---
|
||||
|
||||
if ( isset($_GET['op']) )
|
||||
{
|
||||
if ($_GET['op'] == "add")
|
||||
@ -88,10 +95,18 @@ if ( isset($_GET['op']) )
|
||||
|
||||
//PreInit these values
|
||||
$content['DisplayName'] = "";
|
||||
$content['userid'] = null;
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
$content['VIEWID'] = "";
|
||||
$content['FormUrlAddOP'] = "?op=add";
|
||||
$content['userid'] = null;
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['CHECKED_ISUSERONLY'] = "checked";
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
@ -132,6 +147,11 @@ if ( isset($_GET['op']) )
|
||||
else
|
||||
$content['CHECKED_ISUSERONLY'] = "";
|
||||
|
||||
// --- Can only EDIT own views!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 && $content['userid'] == NULL )
|
||||
DieWithFriendlyErrorMsg( $content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] );
|
||||
// ---
|
||||
|
||||
// --- Check if groups are available
|
||||
$content['SUBGROUPS'] = GetGroupsForSelectfield();
|
||||
if ( is_array($content['SUBGROUPS']) )
|
||||
@ -301,11 +321,20 @@ if ( isset($_POST['op']) )
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
// --- Can only create a USER source!
|
||||
if ( !isset($_SESSION['SESSION_ISADMIN']) || $_SESSION['SESSION_ISADMIN'] == 0 )
|
||||
{
|
||||
$content['userid'] = $content['SESSION_USERID'];
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['userid'] = "null";
|
||||
if ( isset ($_POST['groupid']) && $_POST['groupid'] != -1 )
|
||||
$content['groupid'] = intval($_POST['groupid']);
|
||||
else
|
||||
$content['groupid'] = "null";
|
||||
}
|
||||
}
|
||||
|
||||
// --- Check mandotary values
|
||||
|
@ -104,6 +104,7 @@ $content['LN_GEN_INJECTBODYHEADER'] = "Voranstellen von HTML Code am Anfang des
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Voranstellen von HTML Code Am Ende des <body> Bereichs.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optionale LogAnalyzer-Logo-URL. Bitte für das Standard-Logo leer lassen.";
|
||||
$content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allowed to perform any change operations.";
|
||||
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "Benutzer Optionen";
|
||||
|
@ -106,6 +106,7 @@ $content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional LogAnalyzer Logo URL. Leave empty to use the default one.";
|
||||
$content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allowed to perform any change operations.";
|
||||
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -106,6 +106,7 @@ $content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional LogAnalyzer Logo URL. Leave empty to use the default one.";
|
||||
$content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allowed to perform any change operations.";
|
||||
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -104,6 +104,7 @@ $content['LN_GEN_INJECTBODYHEADER'] = "Inject this html code at the beginning of
|
||||
$content['LN_GEN_INJECTBODYFOOTER'] = "Inject this html code at the end <body> area.";
|
||||
$content['LN_ADMIN_PHPLOGCON_LOGOURL'] = "Optional LogAnalyzer Logo URL. Leave empty to use the default one.";
|
||||
$content['LN_ADMIN_ERROR_READONLY'] = "This is a READONLY User, you are not allowed to perform any change operations.";
|
||||
$content['LN_ADMIN_ERROR_NOTALLOWEDTOEDIT'] = "You are not allowed to edit this configuration item.";
|
||||
|
||||
// User Center
|
||||
$content['LN_USER_CENTER'] = "User Options";
|
||||
|
@ -121,7 +121,7 @@
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_GEN_GROUPONLY}</b></td>
|
||||
<td align="right" class="line2">
|
||||
<select name="groupid" size="1" STYLE="width: 300px">
|
||||
<select name="groupid" size="1" STYLE="width: 300px" {READONLY_ISUSERONLY}>
|
||||
<!-- BEGIN SUBGROUPS -->
|
||||
<option value="{mygroupid}" {group_selected}>{groupname}</option>
|
||||
<!-- END SUBGROUPS -->
|
||||
|
@ -84,7 +84,7 @@
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_GEN_GROUPONLY}</b></td>
|
||||
<td align="right" class="line2">
|
||||
<select name="groupid" size="1" STYLE="width: 300px">
|
||||
<select name="groupid" size="1" STYLE="width: 300px" {READONLY_ISUSERONLY}>
|
||||
<!-- BEGIN SUBGROUPS -->
|
||||
<option value="{mygroupid}" {group_selected}>{groupname}</option>
|
||||
<!-- END SUBGROUPS -->
|
||||
|
@ -290,7 +290,7 @@
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2"><b>{LN_GEN_GROUPONLY}</b></td>
|
||||
<td align="right" class="line2">
|
||||
<select name="groupid" size="1" STYLE="width: 300px">
|
||||
<select name="groupid" size="1" STYLE="width: 300px" {READONLY_ISUSERONLY}>
|
||||
<!-- BEGIN SUBGROUPS -->
|
||||
<option value="{mygroupid}" {group_selected}>{groupname}</option>
|
||||
<!-- END SUBGROUPS -->
|
||||
|
@ -81,7 +81,7 @@
|
||||
<tr>
|
||||
<td align="left" class="cellmenu2_naked"><b>{LN_GEN_GROUPONLY_LONG}</b></td>
|
||||
<td align="right" class="line2">
|
||||
<select name="groupid" size="1" STYLE="width: 300px">
|
||||
<select name="groupid" size="1" STYLE="width: 300px" {READONLY_ISUSERONLY}>
|
||||
<!-- BEGIN SUBGROUPS -->
|
||||
<option value="{mygroupid}" {group_selected}>{groupname}</option>
|
||||
<!-- END SUBGROUPS -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user