Revise the permission checking on user mapping DDL commands.
commitd1750c9f6485089f9c28750360071716e4fd9049
authorpetere <petere>
Tue, 20 Jan 2009 09:10:20 +0000 (20 09:10 +0000)
committerpetere <petere>
Tue, 20 Jan 2009 09:10:20 +0000 (20 09:10 +0000)
tree351d6bca9aa1f6a767b540abcd2f36b7c836ab27
parentb2078cfc44fd30b7d8db65b0ea7f257780428026
Revise the permission checking on user mapping DDL commands.
CREATE/ALTER/DROP USER MAPPING are now allowed either by the server owner or
by a user with USAGE privileges for his own user name.  This is more or less
what the SQL standard wants anyway (plus "implementation-defined")

Hide information_schema.user_mapping_options.option_value, unless the current
user is the one associated with the user mapping, or is the server owner and
the mapping is for PUBLIC, or is a superuser.  This is to protect passwords.

Also, fix a bug in information_schema._pg_foreign_servers, which hid servers
using wrappers where the current user did not have privileges on the wrapper.
The correct behavior is to hide servers where the current user has no
privileges on the server.
doc/src/sgml/information_schema.sgml
doc/src/sgml/ref/alter_user_mapping.sgml
doc/src/sgml/ref/create_user_mapping.sgml
doc/src/sgml/ref/drop_user_mapping.sgml
src/backend/catalog/information_schema.sql
src/backend/commands/foreigncmds.c
src/test/regress/expected/foreign_data.out
src/test/regress/sql/foreign_data.sql