Re: rights for schema

From: Philipp Kraus <philipp(dot)kraus(at)flashpixx(dot)de>
To: Philipp Kraus <philipp(dot)kraus(at)flashpixx(dot)de>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: rights for schema
Date: 2012-12-31 17:36:40
Message-ID: D46AE7F3-F305-496D-AE41-7FFE82AD9A9B@flashpixx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Am 31.12.2012 um 18:02 schrieb Philipp Kraus:

>
> Am 31.12.2012 um 15:54 schrieb Adrian Klaver:
>
>> On 12/31/2012 05:41 AM, Philipp Kraus wrote:
>>>
>>> Am 31.12.2012 um 02:11 schrieb Adrian Klaver:
>>>
>>
>>>>
>>>> Actually as of 9.0 that is not strictly true:
>>>> http://www.postgresql.org/docs/9.2/interactive/sql-alterdefaultprivileges.html
>>>
>>> I have create a view for access a table and rules for modifiy the based table. The table has got a trigger.
>>> If I run an update on the view, I get an error "permission denied" for the trigger call. My user modifies
>>> only the "view", so do the user also get access to the trigger (execution right)? IMHO the trigger is run
>>> by postgres self, so the user don't need a right on the trigger.
>>
>> Was the error for the trigger or the function the trigger called?
>
> ERROR: permission denied for schema usermanagement
>
> usermanagement ist ein schema and the base table calls a function within this schema, this
> checks if the user is super user with
>
> select current_setting('is_superuser') = 'on' into l_issuper;
>
> and checks some other datarows, which stores additional information about the user
> The trigger calls a function "isAdministrator" within the schema.

I have changed the security option of the function from "security invoker" to "security definer" and it works :-)

Phil

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2012-12-31 18:14:58 Permission for relationship but not for select is possible?
Previous Message Philipp Kraus 2012-12-31 17:02:56 Re: rights for schema