Queries that return permissions

Поиск
Список
Период
Сортировка
Искать

Queries that return permissions

От:
Thom Dyson <TDyson@sybex.com>
Дата:




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.


Re: Queries that return permissions

От:
Joe Conway <mail@joeconway.com>
Дата:
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

Re: Queries that return permissions

От:
Thom Dyson <TDyson@sybex.com>
Дата:




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

Re: Queries that return permissions - D'OH

От:
Thom Dyson <TDyson@sybex.com>
Дата:




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

Thom Dyson
Director of Information Services
Sybex, Inc.




                                                                           
             Joe Conway                                                    
                                                                     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)

Re: Queries that return permissions

От:
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Дата:
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
FAQ