Great, I like the latter approach. ( Reading the php make me headache. :p )
> That way even though the pages are readable, if a non admin views any > page in that hierarchy, they get forwarded to your error page. This > would not stop someone from doing [(include dictionary.1)] however. > Just depends on how airtight you want it. The [(include)] is find because I protect the whole site from "action.create" and "action.edit" , so no one can create any page. Thks. linly On 3月4日, 下午5時56分, The Editor <[email protected]> wrote: > This is not easy. One idea might be to write a custom search function like > this: > > function BOLTFmysearch($args, $zone='') { > ## FUNCTION FOR SEARCHING INDEX. MANY POSSIBLE PARAMETERS. LIMIT PAGES > BY PAGES, PATTERN, GROUP, INCLUDE, EXCLUDE, TYPE, FOLDER, DIR. SEARCH > TEXT,DATA,LINK. ORGANIZE BY SORT,IF. OUTPUT IS TEMPLATE OR FMT > global $pageLink, $pagesDir, $outarray; > $outarray = BOLTsearchPageList($args, $zone, false); // changing > this to false should bypass authorizations check > if (isset($args['text'])) BOLTcheckNest1($args['text'], 'text', > $args); > if (isset($args['data'])) BOLTcheckNest1($args['data'], 'data', > $args); > if (isset($args['link'])) BOLTcheckNest1($args['link'], 'link', > $args); > return BOLTdisplay($outarray, $args, $zone); > } > > Then either use [(mysearch )] in your wiki, or remap search to > mysearch like this: > > $BOLTtoolmap['f']['search'] = 'mysearch'; > > This will remap all the calls to the search function to your custom > search function which bypasses authorizations. But this may not be > wise as there may be other pages you do not want searchable... Of > course you could hack the function even more based on your needs... > > The easier, non-php option is to put all your disctionary pages in > some hierarchy, like dictionary.1, dictionary.2, etc. Then in > dictionary.header put [if ! admin]<(forward main.error)>[if] > > That way even though the pages are readable, if a non admin views any > page in that hierarchy, they get forwarded to your error page. This > would not stop someone from doing [(include dictionary.1)] however. > Just depends on how airtight you want it. > > Cheers, > Dan > > On Wed, Mar 4, 2009 at 4:18 AM, Linly <[email protected]> wrote: > > > I have my data in a group, say, dictionary. How can I protect > > "dictionary*" from guest view, but allow guest search? > > > I know this is a little weird. But I can explain. The reason is I > > supply dictionary search service, so the pages under dictionary should > > be searchable. However I don't want the data file to be easily copied, > > so I have to protect them from "action.view". But the protection also > > stop them to be searched... > > > Any ideas? > > > Cheers, linly --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
