mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Do not grant all privileges to operators by default
This commit is contained in:
parent
2d08fda940
commit
081c4a88a2
@ -93,7 +93,7 @@ $dbtables = array(
|
|||||||
"idisabled" => "int DEFAULT 0",
|
"idisabled" => "int DEFAULT 0",
|
||||||
"vcavatar" => "varchar(255)",
|
"vcavatar" => "varchar(255)",
|
||||||
"vcjabbername" => "varchar(255)",
|
"vcjabbername" => "varchar(255)",
|
||||||
"iperm" => "int DEFAULT 65535",
|
"iperm" => "int DEFAULT 0", /* Do not grant all privileges by default */
|
||||||
"dtmrestore" => "int NOT NULL DEFAULT 0",
|
"dtmrestore" => "int NOT NULL DEFAULT 0",
|
||||||
"vcrestoretoken" => "varchar(64)",
|
"vcrestoretoken" => "varchar(64)",
|
||||||
),
|
),
|
||||||
@ -254,6 +254,7 @@ function create_table($id, $link)
|
|||||||
|
|
||||||
if ($id == "${mysqlprefix}chatoperator") {
|
if ($id == "${mysqlprefix}chatoperator") {
|
||||||
// Create First Administrator
|
// Create First Administrator
|
||||||
|
// Grant all privileges by default only for First Administrator
|
||||||
mysql_query(
|
mysql_query(
|
||||||
"INSERT INTO ${mysqlprefix}chatoperator ( " .
|
"INSERT INTO ${mysqlprefix}chatoperator ( " .
|
||||||
"vclogin, " .
|
"vclogin, " .
|
||||||
@ -261,14 +262,16 @@ function create_table($id, $link)
|
|||||||
"vclocalename, " .
|
"vclocalename, " .
|
||||||
"vccommonname, " .
|
"vccommonname, " .
|
||||||
"vcavatar, " .
|
"vcavatar, " .
|
||||||
"vcemail " .
|
"vcemail, " .
|
||||||
|
"iperm " .
|
||||||
") values ( " .
|
") values ( " .
|
||||||
"'admin', " .
|
"'admin', " .
|
||||||
"MD5(''), " .
|
"MD5(''), " .
|
||||||
"'', " .
|
"'', " .
|
||||||
"'Administrator', " .
|
"'Administrator', " .
|
||||||
"'Administrator', " .
|
"'Administrator', " .
|
||||||
"''" .
|
"'', " .
|
||||||
|
"65535" .
|
||||||
")",
|
")",
|
||||||
$link
|
$link
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user