Question
I want to put an inline search into the Main
WebHome of a
public wiki. The search should list the most recent changes in the web. This seems to be straightforward. However, there is
some authorization due to the inline search that requires me to log in when I restart the browser and simply
view the page. Naturally,
users should not need to log in just to view the homepage. If I disable the search (
%xSEARCH{...}%), then login is no longer required. So there must be something in my inline search that causes the
viewauth to be triggered --
but what?
I have tried to edit a page in the
Main web to include one or both of
ALLOWTOPICVIEW and
DENYTOPICVIEW, but this does not seem to trigger the
viewauth by itself.
I use Firefox for editing TWiki, and IE for browsing
without logging in to my TWiki. That way I can run a logged-in user in Firefox and a not-logged-in user in IE at the same time. But I've also tried just using a single browser and closing it in between these exercises, as well as testing from work and from home; it doesn't change anything so it's clearly not a browser or network issue.
Example
Here's the code that I use:
- I changed above example from the
Main web to the TWiki web because the Main web is slow on TWiki.org -- PeterThoeny - 05 May 2005
Note that it just looks in the
Main web. This works on my website, too.
Example on my website:
http://g-b.dk/Sandbox/SupportQuestion20050504
If I set it to the
Torben web instead (
Torben is a wiki web on
g-b.dk), then I'm required to log in.
Example on my website:
http://g-b.dk/Sandbox/SupportQuestion20050504Torben
Environment
--
TorbenGB - 04 May 2005
Answer
TWiki redirects from view to viewauth if the topic, one of the included topics or a topic in a SEARCH result has a view access restriction. This is a security measure and there is no way around it. If you need the SEARCH in the home page make sure that no topic in the
Torben web has a view access restiction.
--
PeterThoeny - 05 May 2005
I thought this was the case too, but my
Main web also has
restricted pages (using
ALLOWTOPICVIEW) and still the search works. Why does the search work in
Main but fail in other webs?
--
TorbenGB - 09 May 2005
The SEARCH in the Main web proably does not list the protected pages?
--
PeterThoeny - 10 May 2005
Interesting: the search only displays the 3 most recent, and none of these were protected. I then edited a protected page, and went to this page again (not logged in).
Now I'm getting the
viewauth version... but before I edited the protected page, this page did not cause
viewauth....
--
TorbenGB - 14 May 2005