Fixed issue where the user was not able to update policy if the policy is created with space. Fixes #5686

This commit is contained in:
Pradip Parkale 2020-07-21 18:14:49 +05:30 committed by Akshay Joshi
parent f177d54f21
commit 28a4359020
3 changed files with 10 additions and 9 deletions

View File

@ -50,3 +50,4 @@ Bug fixes
| `Issue #5673 <https://redmine.postgresql.org/issues/5673>`_ - Fixed an issue where fetching the schema throws an error if the database is not connected in Schema Diff. | `Issue #5673 <https://redmine.postgresql.org/issues/5673>`_ - Fixed an issue where fetching the schema throws an error if the database is not connected in Schema Diff.
| `Issue #5675 <https://redmine.postgresql.org/issues/5675>`_ - Fixed CSRF errors when pgAdmin opened in an iframe on safari browser. | `Issue #5675 <https://redmine.postgresql.org/issues/5675>`_ - Fixed CSRF errors when pgAdmin opened in an iframe on safari browser.
| `Issue #5677 <https://redmine.postgresql.org/issues/5677>`_ - Fixed text color issue in explain analyze for the Dark theme. | `Issue #5677 <https://redmine.postgresql.org/issues/5677>`_ - Fixed text color issue in explain analyze for the Dark theme.
| `Issue #5686 <https://redmine.postgresql.org/issues/5686>`_ - Fixed issue where the user was not able to update policy if the policy is created with space.

View File

@ -2,7 +2,7 @@
{## Change policy owner ##} {## Change policy owner ##}
{#####################################################} {#####################################################}
{% if data.policyowner and o_data.policyowner != data.policyowner %} {% if data.policyowner and o_data.policyowner != data.policyowner %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
TO {{ conn|qtTypeIdent(data.policyowner) }}; TO {{ conn|qtTypeIdent(data.policyowner) }};
{% endif %} {% endif %}
@ -10,7 +10,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy using condition ##} {## Change policy using condition ##}
{#####################################################} {#####################################################}
{% if data.using and o_data.using != data.using %} {% if data.using and o_data.using != data.using %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
USING ({{ data.using }}); USING ({{ data.using }});
{% endif %} {% endif %}
@ -18,7 +18,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy with check condition ##} {## Change policy with check condition ##}
{#####################################################} {#####################################################}
{% if data.withcheck and o_data.withcheck != data.withcheck %} {% if data.withcheck and o_data.withcheck != data.withcheck %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
WITH CHECK ({{ data.withcheck }}); WITH CHECK ({{ data.withcheck }});
{% endif %} {% endif %}
@ -26,7 +26,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy name ##} {## Change policy name ##}
{#####################################################} {#####################################################}
{% if data.name and o_data.name != data.name %} {% if data.name and o_data.name != data.name %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
RENAME TO {{ conn|qtIdent(data.name) }}; RENAME TO {{ conn|qtIdent(data.name) }};
{% endif %} {% endif %}

View File

@ -2,7 +2,7 @@
{## Change policy owner ##} {## Change policy owner ##}
{#####################################################} {#####################################################}
{% if data.policyowner and o_data.policyowner != data.policyowner %} {% if data.policyowner and o_data.policyowner != data.policyowner %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
TO {{ conn|qtTypeIdent(data.policyowner) }}; TO {{ conn|qtTypeIdent(data.policyowner) }};
{% endif %} {% endif %}
@ -10,7 +10,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy using condition ##} {## Change policy using condition ##}
{#####################################################} {#####################################################}
{% if data.using and o_data.using != data.using %} {% if data.using and o_data.using != data.using %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
USING ({{ data.using }}); USING ({{ data.using }});
{% endif %} {% endif %}
@ -18,7 +18,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy with check condition ##} {## Change policy with check condition ##}
{#####################################################} {#####################################################}
{% if data.withcheck and o_data.withcheck != data.withcheck %} {% if data.withcheck and o_data.withcheck != data.withcheck %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
WITH CHECK ({{ data.withcheck }}); WITH CHECK ({{ data.withcheck }});
{% endif %} {% endif %}
@ -26,7 +26,7 @@ ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
{## Change policy name ##} {## Change policy name ##}
{#####################################################} {#####################################################}
{% if data.name and o_data.name != data.name %} {% if data.name and o_data.name != data.name %}
ALTER POLICY {{ o_data.name }} ON {{conn|qtIdent(o_data.schema, o_data.table)}} ALTER POLICY {{ conn|qtIdent(o_data.name) }} ON {{conn|qtIdent(o_data.schema, o_data.table)}}
RENAME TO {{ conn|qtIdent(data.name) }}; RENAME TO {{ conn|qtIdent(data.name) }};
{% endif %} {% endif %}