If I want to restrict the read access to some custom namespace named "Restrict", and I implement the wiki site like this,
* http://localhost/publicwiki ** db: wikidb ** permission: anyone can read pages ** no custom namespace
* http://localhost/restrictwiki ** db: wikidb (share the same table with publicwiki) ** permission: only sysop can read pages ** custom namespace name: "Restrict"
(I may optionally modify the login process, so that, http://localhost/publicwiki --> sysop login --> forwarded to http://localhost/restrictwiki)
My question is, * Is there any problem if publicwiki and restrictwiki share the same table, but restrictwiki is configured to recognize additional custom namespace named "Restrict", while publicwiki not?
On Fri, Oct 31, 2008 at 5:31 AM, Anon Sricharoenchai anon.hui@gmail.com wrote:
- Is there any problem if publicwiki and restrictwiki share the same
table, but restrictwiki is configured to recognize additional custom namespace named "Restrict", while publicwiki not?
If you mean "could people still view the pages in the undefined namespace", the answer is probably yes, somehow. It would likely be tricky, but it could probably be done (e.g., using the API, maybe other ways too). If you really need to make a namespace invisible, you might be better off using an extension like Lockdown -- or better yet, not using MediaWiki.
Aryeh Gregor schreef:
On Fri, Oct 31, 2008 at 5:31 AM, Anon Sricharoenchai anon.hui@gmail.com wrote:
- Is there any problem if publicwiki and restrictwiki share the same
table, but restrictwiki is configured to recognize additional custom namespace named "Restrict", while publicwiki not?
If you mean "could people still view the pages in the undefined namespace", the answer is probably yes, somehow. It would likely be tricky, but it could probably be done (e.g., using the API, maybe other ways too).
The API can be used to view such 'invisible' pages, yes, although it wouldn't be trivial: you'd have to know (or guess) one of the following things: * a user who edited the page * a non-restricted page that is linked from the page * a non-restricted page or template that is transcluded by the page * a non-restricted image that is used on the page * a category that the page is in
Also, Special:Recentchanges will probably show changes to these restricted pages (at least list=recentchanges will).
Roan Kattouw (Catrope)
On Fri, Oct 31, 2008 at 11:17 AM, Roan Kattouw roan.kattouw@home.nl wrote:
The API can be used to view such 'invisible' pages, yes, although it wouldn't be trivial: you'd have to know (or guess) one of the following things:
- a user who edited the page
- a non-restricted page that is linked from the page
- a non-restricted page or template that is transcluded by the page
- a non-restricted image that is used on the page
- a category that the page is in
You can't look things up using numeric namespace keys?
Also, Special:Recentchanges will probably show changes to these restricted pages (at least list=recentchanges will).
Right, of course. I wonder what happens if you call getPrefixedText() on a Title whose namespace id isn't recognized. Quite possibly a crash.
Anyway, short answer: don't do it, it almost certainly won't work.
Aryeh Gregor schreef:
On Fri, Oct 31, 2008 at 11:17 AM, Roan Kattouw roan.kattouw@home.nl wrote:
The API can be used to view such 'invisible' pages, yes, although it wouldn't be trivial: you'd have to know (or guess) one of the following things:
- a user who edited the page
- a non-restricted page that is linked from the page
- a non-restricted page or template that is transcluded by the page
- a non-restricted image that is used on the page
- a category that the page is in
You can't look things up using numeric namespace keys?
No, because XXnamespace parameters only accept namespaces that actually exist (according to the config, anyway). Feeding stuff through titles= obviously won't work because the namespace prefix isn't recognized, which means you have to use a generator: you need another query to produce these titles for you and feed them to prop=revisions. Unfortunately, queries like allpages only work on one (recognized) namespace at a time, so the only queries likely to work are usercontribs, backlinks, embeddedin, imageusage and categorymembers.
Roan Kattouw (Catrope)
wikitech-l@lists.wikimedia.org