Thread: PATCH: Updated ACL parsing function. [pgAdmin4]

PATCH: Updated ACL parsing function. [pgAdmin4]

From
Murtuza Zabuawala
Date:
Hi All,

I have updated "parse_priv_to_db" function to return list instead of string.
I have also updated the common macro template under servers node. 
(Please review & verify respective nodes ACL functionality though)

This will also allow us to operate on individual privileges & also we needed this functionality for column node.

For example,

Earlier: priv was string 

GRANT {{ priv }} ON {{ type }} TO {{ conn|qtIdent(role) }};

Now: priv will be List, which we need to handle in jinja templates.

GRANT {{ priv|join(', ') }} ON {{ type }} TO {{ conn|qtIdent(role) }};


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: PATCH: Updated ACL parsing function. [pgAdmin4]

From
Dave Page
Date:
Thanks, patch applied.

On Tue, Mar 8, 2016 at 1:51 PM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
> Hi All,
>
> I have updated "parse_priv_to_db" function to return list instead of string.
> I have also updated the common macro template under servers node.
> (Please review & verify respective nodes ACL functionality though)
>
> This will also allow us to operate on individual privileges & also we needed
> this functionality for column node.
>
> For example,
>
> Earlier: priv was string
>
> GRANT {{ priv }} ON {{ type }} TO {{ conn|qtIdent(role) }};
>
> Now: priv will be List, which we need to handle in jinja templates.
>
> GRANT {{ priv|join(', ') }} ON {{ type }} TO {{ conn|qtIdent(role) }};
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company