Queries that return permissions

Queries that return permissions

am 13.02.2004 18:51:36 von Thom Dyson

I'm laying the ground work to migrate a database to a web front end. One
thing I would like is, when generating the HTML, to display read-only
fields as text, while fields that are updateable as input fields, based on
the permissions that the user has to the table. This way a given user
would not be confused trying to change data they have no permission to.

Does anyone know where there is code that will do this sort of thing?

Thom Dyson
Director of Information Services
Sybex, Inc.



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Re: Queries that return permissions

am 13.02.2004 19:15:05 von Joe Conway

Thom Dyson wrote:
> the permissions that the user has to the table.

> Does anyone know where there is code that will do this sort of thing?

See:
http://www.postgresql.org/docs/current/static/functions-misc .html#FUNCTIONS-MISC-ACCESS-TABLE

HTH,

Joe

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: Queries that return permissions

am 13.02.2004 19:19:49 von Thom Dyson

Oops, Not running 7.4 yet. Maybe I should upgrade :)

Thom Dyson
Director of Information Services
Sybex, Inc.



Joe Conway wrote on 02/13/2004 10:15:05 AM:

> Thom Dyson wrote:
> > the permissions that the user has to the table.

> > Does anyone know where there is code that will do this sort of thing?

> See:
> http://www.postgresql.org/docs/current/static/functions-misc .
> html#FUNCTIONS-MISC-ACCESS-TABLE

> HTH,

> Joe


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Re: Queries that return permissions - D"OH

am 13.02.2004 19:21:52 von Thom Dyson

Oh MAN. I NEED more coffee. 7.3 has this.

Thom Dyson
Director of Information Services
Sybex, Inc.





Joe Conway
om> To
Sent by: Thom Dyson
pgsql-php-owner@p cc
ostgresql.org pgsql-php@postgresql.org
Subject
Re: [PHP] Queries that return
02/13/2004 10:15 permissions
AM









Thom Dyson wrote:
> the permissions that the user has to the table.

> Does anyone know where there is code that will do this sort of thing?

See:
http://www.postgresql.org/docs/current/static/functions-misc .html#FUNCTIONS-MISC-ACCESS-TABLE


HTH,

Joe

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Re: Queries that return permissions

am 14.02.2004 05:13:01 von Christopher Kings-Lynne

Hi Thom,

Download phpPgAdmin (phppgadmin.sourceforge.net) and look at the
getPrivileges function in classes/database/Postgres.php.

Cheers,

Chris

Thom Dyson wrote:

>
>
>
> I'm laying the ground work to migrate a database to a web front end. One
> thing I would like is, when generating the HTML, to display read-only
> fields as text, while fields that are updateable as input fields, based on
> the permissions that the user has to the table. This way a given user
> would not be confused trying to change data they have no permission to.
>
> Does anyone know where there is code that will do this sort of thing?
>
> Thom Dyson
> Director of Information Services
> Sybex, Inc.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster