Re: [GENERAL] View permissions in 7.1

Поиск
Список
Период
Сортировка
Искать

Re: [GENERAL] View permissions in 7.1

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Lieven Van Acker  writes:
> [ permission checking doesn't work correctly for nested views in 7.1 ]

I think the attached patch fixes your problem; at least it fixes the
example you gave.  Do you have time to try it out more heavily before
Friday?  I'd like to commit it for 7.1.1 if it's right ...

			regards, tom lane

*** src/backend/rewrite/rewriteHandler.c.orig	Mon Apr 16 20:32:58 2001
--- src/backend/rewrite/rewriteHandler.c	Wed May  2 22:06:16 2001
***************
*** 309,317 ****
--- 309,319 ----
  	Assert(subrte->relid == relation->rd_id);
  	subrte->checkForRead = rte->checkForRead;
  	subrte->checkForWrite = rte->checkForWrite;
+ 	subrte->checkAsUser = rte->checkAsUser;
  
  	rte->checkForRead = false;	/* no permission check on subquery itself */
  	rte->checkForWrite = false;
+ 	rte->checkAsUser = InvalidOid;
  
  	/*
  	 * FOR UPDATE of view?
FAQ