Re: has_database_privilege is true?

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: has_database_privilege is true?
Date: 2020-08-23 14:28:34
Message-ID: 20200823142834.GM29590@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Paul Förster (paul(dot)foerster(at)gmail(dot)com) wrote:
> I create a role "test" and it can't (intentionally) login. But why does has_database_privilege() return true if "test" can't connect to the cluster and can't use any database? Is this a bug or am I doing something strange here? Any ideas?

The role attribute system (where you see 'cannot login') is largely
independent from the GRANT system (which is what has_database_privilege
is checking). Both are required for a user to log in.

Thanks,

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-08-23 14:48:56 Re: has_database_privilege is true?
Previous Message Paul Förster 2020-08-23 13:10:35 has_database_privilege is true?