From: Karl O. P. <ko...@me...> - 2013-05-08 02:17:57
|
Re: irc below I've got it in my head that the interface should only display an action when the user has the ability to carry out the action. We use the $data->has* tests to avoid displaying parts of the interface that don't apply to older pg releases, why shouldn't the interface also pay attention to permissions and anything else that can used to tell that the operation is not permitted -- and if not permitted then not display the interface? So, I test for insert permission before displaying the import tab for tables, permission and insert-ness on views likewise. I plan to carry this through the display interface in general. E.g. do not display a delete button if the user has no delete permission. Now, the issue with views that arises is: what about rules? I've avoided thinking about rules entirely; they are depreciated in favor of triggers and we won't be worse off then we are now in terms of functionality if rules are ignored. On the other hand perhaps there's an easy way to tell if there's an instead rule on insert; my casual glance hasn't found one. So, if there's an easy way to test against rules, fine we can do that. Otherwise I'm planning to ignore them when it comes to determining whether an operation will succeed or fail. Thoughts? [16:04:20]<karlpinc> Humm. I'd not paid attention to the foreign key part. I always make a view for that sort of thing and put a insert trigger on it. Sadly the stock ppa does not import into a view. However I've some patches that do so. I'm re-working them now for re-submission to ppa -- mostly to add ppa self-tests to test the changes but I've tweaked things in a way that breaks backward compatibility with older pg releases so I need a teeny fix for <karlpinc> that too. I'm in the process of writing these patches now. I've got the self tests done but when I went to do backward compatibity I started shaving yaks. I'm back on track now. [17:22:50]<xzi11a> that seems odd to me. i wouldnt think an admin interface would care about how the insert against the view is carried out Karl <ko...@me...> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein |