mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Add support for "where" field privilege
In Elasticsearch, only indexed fields are searchable.
This commit is contained in:
@@ -340,7 +340,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
"default" => trim($row['default_expression']),
|
||||
"null" => $nullable,
|
||||
"auto_increment" => '0',
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 0),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 0, "where" => 1),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -471,11 +471,6 @@ if (isset($_GET["elastic"])) {
|
||||
);
|
||||
|
||||
foreach ($mappings as $name => $field) {
|
||||
$has_index = !isset($field["index"]) || $field["index"];
|
||||
|
||||
// TODO: privileges: where => $has_index
|
||||
// TODO: privileges: sort => $field["type"] != "text"
|
||||
|
||||
$result[$name] = array(
|
||||
"field" => $name,
|
||||
"full_type" => $field["type"],
|
||||
|
@@ -254,7 +254,7 @@ ORDER BY r.RDB$FIELD_POSITION';
|
||||
"null" => (trim($row["FIELD_NOT_NULL_CONSTRAINT"]) == "YES"),
|
||||
"auto_increment" => '0',
|
||||
"collation" => trim($row["FIELD_COLLATION"]),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1),
|
||||
"comment" => trim($row["FIELD_DESCRIPTION"]),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user