Ensure that create RLS Policy menu should not be visible for catalog objects. Fixes #5633

This commit is contained in:
Pradip Parkale 2020-07-09 18:04:32 +05:30 committed by Akshay Joshi
parent b4c25bdc0a
commit c58fda0a70
2 changed files with 7 additions and 1 deletions

View File

@ -31,4 +31,5 @@ Bug fixes
| `Issue #5621 <https://redmine.postgresql.org/issues/5621>`_ - Remove extra brackets from reverse engineering SQL of RLS Policy.
| `Issue #5629 <https://redmine.postgresql.org/issues/5629>`_ - Fixed an issue where the user is able to edit properties when some of the collection nodes are selected.
| `Issue #5630 <https://redmine.postgresql.org/issues/5630>`_ - Fixed an issue where installation of pgadmin4 not working on 32-bit Windows.
| `Issue #5631 <https://redmine.postgresql.org/issues/5631>`_ - Fixed 'cant execute empty query' issue when remove the value of 'USING' or 'WITH CHECK' option of RLS Policy.
| `Issue #5631 <https://redmine.postgresql.org/issues/5631>`_ - Fixed 'cant execute empty query' issue when remove the value of 'USING' or 'WITH CHECK' option of RLS Policy.
| `Issue #5633 <https://redmine.postgresql.org/issues/5633>`_ - Ensure that create RLS Policy menu should not be visible for catalog objects.

View File

@ -222,6 +222,11 @@ define('pgadmin.node.row_security_policy', [
var treeData = this.getTreeNodeHierarchy(item),
server = treeData['server'];
// If node is under catalog then do not allow 'create' menu
if (treeData['catalog'] != undefined)
return false;
// If server is less than 9.5 then do not allow 'create' menu
if (server && server.version < 90500)
return false;