[development] Making a whole site location aware - a design question

Dave Cohen drupal at dave-cohen.com
Fri Aug 18 20:56:24 UTC 2006


On Thursday 17 August 2006 22:00, drupal at mclewin.com wrote:
> Dave,
>

> I will want a few exceptions to having displays filter based on location
> (admin interfaces and search engine friendly lists of everything in the
> db).  If I use hook_db_rewrite_sql to filter as you suggest below, can I
> also selectivly disable the rewrite?  (If RTFM is the most appropriate
> answer here I'll take it :) )

This won't be difficult.  For anonymous users (including search engines) you 
wont know a location, so you can simply allow them to see all locations.

For other users, you can create a permission 'access all locations', then use 
user_access() to test that permission before rewriting the query.

RTFM and experiment.  It should not be too difficult.

-Dave



More information about the development mailing list