X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8EF7CD1C9CF for ; Sat, 14 Feb 2004 04:13:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39741-02 for ; Sat, 14 Feb 2004 00:13:06 -0400 (AST) Received: from relay01.kbs.net.au (relay01.kbs.net.au [203.220.32.149]) by svr1.postgresql.org (Postfix) with ESMTP id BD5D7D1D1A4 for ; Sat, 14 Feb 2004 00:13:05 -0400 (AST) Received: from [203.221.247.7] (helo=familyhealth.com.au) by relay01.kbs.net.au with esmtp (Exim 3.36 #2) id 1ArrAs-0005Ar-00; Sat, 14 Feb 2004 15:13:03 +1100 Message-ID: <402DA04D.3080703@familyhealth.com.au> Date: Sat, 14 Feb 2004 12:13:01 +0800 From: Christopher Kings-Lynne User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thom Dyson Cc: pgsql-php@postgresql.org Subject: Re: Queries that return permissions References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/35 X-Sequence-Number: 2583 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