From: danap <danap@itstriangle.com>
To: slangley@scharp.org, PostgreSQL JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: Filtering DatabaseMetaData to show only the items for which the current user has access
Date: Mon, 12 Sep 2016 18:51:10 -0600
Message-ID: <57D74D7E.8070907@itstriangle.com> (raw)
In-Reply-To: <338A7B0E9A69874B9D933A0B0D2527A4E708469E@adama.fhcrc.org>
References: <338A7B0E9A69874B9D933A0B0D2527A4E708469E@adama.fhcrc.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Langley, Scott E wrote:
> Hello PostgreSQL JDBC Developers,
>
> We have a desire to hide unneeded database objects from our database-challenged
> users - as they might see in a simple database viewer application - by removing
> their privileges on such objects.
>
> It appears that many database viewing applications, e.g., DbVisualizer, rely on
> what is returned by the JDBC driver’s DatabaseMetaData methods to determine
> which schemas and tables to display to the user:
>
> ~
> ~
> ~
>
> If you would accept a patch along these lines, which approach would be preferable?
>
> Thanks for your consideration.
> Scott Langley
Seems what you are asking the JDBC driver to do is the work of what
should be done by a client application. Yes MySQL does offer this
more advanced control of users.
Most of this can be accomplished as indicated, filtering through the
DatabaseMetaData.getTables(catalog, schemaPattern, tableNamePattern,
tableTypes)
MyJSQLView does exactly this and some basic filtering can be accomplished
via a configuration file, myjsqlview.conf. If not edit the DatabaseProperties
Java code to only allow, the particular aspects desired. This might be much
easier then editing the JDBC code to add this feature.
Overall seems the additional control should be requested via the server
features.
danap
http://myjsqlview.com
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: danap@itstriangle.com
Subject: Re: Filtering DatabaseMetaData to show only the items for which the current user has access
In-Reply-To: <57D74D7E.8070907@itstriangle.com>
References: <338A7B0E9A69874B9D933A0B0D2527A4E708469E@adama.fhcrc.org> <57D74D7E.8070907@itstriangle.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox