Description

When you go to a link to a missing page, and you don't have write access to the wiki at the moment, MissingPage behaves oddly.

The "Create new empty page" text is just text -- it appears, but isn't clickable. The list of templates appears and IS clickable, but of course clicking on any of them will yield an error.

I would suggest:

Steps to reproduce

  1. Just visit, say, http://www.complete.org/FakeFakeFake

Example

URL: http://www.complete.org/FakeFakeFake

Component selection

Details

MoinMoin Version

1.8.5

OS and Version

Debian lenny

Python Version

2.5.2

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

It would also be nice to see a config option to let me refer to a differently-named MissingPage for this purpose.

Discussion

From #moin (submitter is CosmicRay)

<CosmicRay> Is there a way on MissingPage to turn an attempt to find a missing page into a search request?  Alternatively, to turn it into a 404?
<CosmicRay> ah, never mind on the 404.  I see it is a 404 already.
<ThomasWaldmann> i also searches for "similar" pages, see right column
<CosmicRay> ah.
<CosmicRay> I'm thinking a config option to give the name of the page to use for MissingPage would be handy.  I'm not seeing one.  Is there one?
<ThomasWaldmann> it is translated, so it is e.g. FehlendeSeite for german
<CosmicRay> the reason is that I've got two hosts pointed at the same data/underlay dir.  One will be for a read-only public website, the other for editing.  I don't want to send a 404 message saying "Create this page" for the read-only site.
<ThomasWaldmann> does it do that for users without write perms?
<CosmicRay> yes
<CosmicRay> it's sorta funny.
<CosmicRay> The "Create new empty page" is not a link, but just non-clickable text.
<CosmicRay> But all the templates are a link
<CosmicRay> clicking on em gives a permissions error of course
<ThomasWaldmann> file a bug please :)
* CosmicRay makes a note

I think, macro should be used to implement described behaviour, not config option. -- EugeneSyromyatnikov 2009-10-07 22:04:51

There are two issues here: configurability of MissingPage, and the behavior of MissingPage. I assume your comment refers to configurability. As for that, there is already page_front_page in the configuration. I don't see how a macro could help in this situation. If you are referring to the actions of MissingPage, I agree the macro should handle all of the cases I enumerated automatically. There should be no configuration needed for it to stop presenting irrelevant options to people that don't have write permission. --JohnGoerzen 2009-10-07 23:18:56

The idea is giving ability to display information based on permissions. We can't detect that (there are to many ways to point on action, and is we should add options what to do, if user can't do it, it wouldn't be wiki way), but can manage that in particular places (in places where it can be expected).

Btw, i tried to make some scratch of macro. It's crappy, but i can't done it better. Usage: <<AclBasedText(permission=write, has_perm_text=Has!, hasnt_perm_text=Hasnt!, anonymous_text=Not logged!)>> AclBasedText.py

-- EugeneSyromyatnikov 2009-10-07 23:48:48

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/MissingPageShouldn'tOfferToCreatePageForReadonlyUsers (last edited 2009-11-28 07:43:24 by ReimarBauer)