dbTalk Databases Forums  

Rules and Permissions docs change (was Re: [BUGS] BUG #1610: rewrite

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Rules and Permissions docs change (was Re: [BUGS] BUG #1610: rewrite in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Huxton
 
Posts: n/a

Default Rules and Permissions docs change (was Re: [BUGS] BUG #1610: rewrite - 04-22-2005 , 03:04 AM






Olleg Samoylov wrote:
Quote:
Richard Huxton wrote:

That's not a bug, it's a feature (as they say). I suppose you could
argue that a sequence only used by one table could inherit that
table's permissions by default, but I can see problems when people
reorder GRANT statements.

It's not feature, it's bug. From postgresql documentation 33.4. Rules
and Privileges:
quote> Relations that are used due to rules get checked against the
privileges of the rule owner, not the user invoking the rule. This means
that a user only needs the required privileges for the tables/views that
he names explicitly in his queries.</quote

This dont' true for tables with serial fields.
Hmm - perhaps the documentation needs expanding. Certainly, if your view
references functions you need to make sure permissions are set correctly
on those.

How about changes along the lines of:

Ch 33.4, para 2
"... Relations that are used due to rules get checked against the
privileges of the rule owner, not the user invoking the rule. This means
that a user only needs the required privileges for the objects[1] that
he names explicitly in his queries."

then

"[1] This includes permissions on tables and views you reference in your
view definition. It might also include execute permissions on any
functions referenced, and for updates, permissions on any sequences.
This includes sequences automatically created by use of the SERIAL type."

Perhaps we should also have a reminder to read the rules chapter in the
serial description (ch 8.1.4)

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.