mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_user_mapping.sgml,v 1.1 2008/12/19 16:25:16 petere Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_user_mapping.sgml,v 1.2 2009/01/20 09:10:20 petere Exp $
|
||||
PostgreSQL documentation
|
||||
-->
|
||||
|
||||
@@ -31,10 +31,15 @@ ALTER USER MAPPING FOR { <replaceable class="parameter">username</replaceable> |
|
||||
|
||||
<para>
|
||||
<command>ALTER USER MAPPING</command> changes the definition of a
|
||||
user mapping. Only the owner of the server can change the user
|
||||
mappings of that server.
|
||||
user mapping.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The owner of a foreign server can alter user mappings for that
|
||||
server for any user. Also, a user can alter a user mapping for
|
||||
his own user name if <literal>USAGE</> privilege on the server has
|
||||
been granted to the user.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
Reference in New Issue
Block a user