Skip to content

Commit

Permalink
Merge pull request #17407 from mauriciofauth/system-schemas-grid-edit
Browse files Browse the repository at this point in the history
Disable editing to system schemas
  • Loading branch information
MauricioFauth committed Feb 20, 2022
2 parents ab2426e + 4848ccb commit 855a513
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/classes/Sql.php
Expand Up @@ -1543,7 +1543,8 @@ private function getQueryResponseForResultsReturned(
$editable = ($has_unique
|| $GLOBALS['cfg']['RowActionLinksWithoutUnique']
|| $updatableView)
&& $just_one_table;
&& $just_one_table
&& ! Utilities::isSystemSchema($db);

$_SESSION['tmpval']['possible_as_geometry'] = $editable;

Expand All @@ -1557,7 +1558,7 @@ private function getQueryResponseForResultsReturned(
'pview_lnk' => '1',
];

if (Utilities::isSystemSchema($db) || ! $editable) {
if (! $editable) {
$displayParts = [
'edit_lnk' => $displayResultsObject::NO_EDIT_OR_DELETE,
'del_lnk' => $displayResultsObject::NO_EDIT_OR_DELETE,
Expand Down

0 comments on commit 855a513

Please sign in to comment.