Extension talk:Page access restriction

1.8 support
And what about v. 1.8?! - CharlesC 11:23, 1 November 2006 (UTC)


 * I'm download the version 1.8.1 of wikimedia for intranet use. After read this page for restrict access, i used and works. I'm download the patch for 1.7.1 and replace the "1.7.1" entries by "1.8.1" in a text editor. When i'm patching, promt-me about find some languajes messages files, but dont exist, for that reason i choose skip. - Elidio M. --201.148.140.147 22:21, 8 November 2006 (UTC)


 * Noob question: is there a release for 1.8.2 which doesn't require applying a patch? I'm running 1.8.2 on a windows server (yuck) and don't have access to all the cool big boy tools like patch. Roy --Rmiller 23:08, 28 December 2006 (UTC)
 * I doubt there are pre-patched 1.8x (or 1.9x) releases. You can find patch binaries on windows.  there are standalone versions or you could use cygwin.

1.7 Support
Does anyone know if support for mediawiki 1.7 is being worked on?

From Jerome's website re 1.7 support
his reasons for transitioning from a patch to an extension

'Hi Andy and all,

The patch doesn't work for 1.7.1. As you see many modifications are rejected when patching, due to MW changes.

I think I will not update this patch anymore. I am thinking about an extension, what is more stable when MW updates.

I cannot give any date for the first release, just subscribe to the mailing list to keep in touch :) [restrict-mediawiki-list-subscribe@conseil-recherche-innovation.net restrict-mediawiki-list-subscribe@conseil-recherche-innovation.net])

Read you, Jerome'

-Jinkee 13:27, 9 August 2006 (UTC)

Previously Untitled Questions and Answers
You wrote: This feature is mainly useful for intranet relying on WikiMedia as a non-encyclopedic content management system, like e-learning platforms or informational systems. It is not appropriate to use it to restrict public access!

I really like on the page editing. I was hopign that I would be able to use WikiMedia as a non-encyclopedic content management system on the web, and to prevent public access from the editing tabs for instance (I came here in search of a way of removing the edit tab for everyone except me). But from what you say above it sounds like it is not possible to use Wikimedia in this way. Can this be true?

In fact you can use the patch freely, for the use you want... I just added this warning as it is not in the wiki philosophy to restrict access to pages. The restriction feature is not like hiding the 'edit tab' (the protect tab does it), it avoid users to access and modify pages.

Jej

I see. Also perhaps I can use the 'protect' tab to do what I want. Thank you. The "Philosophy" sounds rather sad though. We all have different ones and they keep us apart.

I'm using MediaWiki to run an internal portal at a small company. One of the management types asked me recently if he could restrict access to certain pages, so I think your patch is exactly the right thing. Any idea on whether it will be merged into the main branch of the source? I know it's not really useful for wikipedia, but it would be nice not to have to patch every new version that I wanted to run...

gjm

I think we have to wait for stable 1.5 before to propose this feature. This version has a new security model, so probably page restriction will be easier and safer to implement. As you say mediawiki is wikipedia oriented so this feature is not useful for the project and maybe has no chance to be merged. So, the patch is a good alternative for now in spite of update problems. But after 1.5 we will have to redo all the job... Another solution would be to think about a new kind of tool, between wiki and formal content management system.

Jej 11:49, 4 May 2005 (UTC)

I might just be missing something, but the phrase "optionaly the user's pages can be restricted to their owner" suggests that this patch will let me do what I want, but I don't seem to be able to get it to work. The desired behavior is this:

I have a MediaWiki used for tracking role-playing campaigns. I've set it up so that anyone can read, but only registered users (i.e. the players) can edit. There are times, however, when a player wants to post something that they don't want other players to read. The idea would be that only they (the creator of the page) and the gamemaster (a sysop) would be able to read or edit it.

The line "optionaly the user's pages can be restricted to their owner" seems to indicate that the player could use the restriction feature on pages they create, but this doesn't seem to be the case. What am I missing?

-- Wordman

I should precise "user home page" only (not pages created by a single user). I mean that the User:XXXX page is only readable/writeable by user XXXX and people in the restrict group. The feature you ask is interesting but need further work on the mediawiki engine. I add it to the todo list. Maybe for mediawiki 1.5...

Jej 8 July 2005 10:15 (UTC)

I'm somewhat confused here. So, this patch will allow me to restrict pages only to the restrict group, or will it allow me to restrict pages to a specific group (preferably a custom defined group)?

-- Ryan

Multiple groups?
Is there a way to define multiple access groups? So that, for example, folks in dept. B-52 can't see the pages created by those in A-51, and vice-versa. Or that folks in dept C can see all the pages, but not edit them. etc. 192.35.232.241 21:27, 14 October 2005 (UTC)

No... It requires probably to go deeper in MW hacking (modify the database scheme for example).

Jej

well, in the database scheme of mediawiki 1.5.x, table page, there is a field called page_restrictions. Some comments lining out that there could be a list of comma-seperated entries representing something like edit=groupX, move=sysop, view=*. In search for a solution of exactly the same problem, I've grep'ed for page_restriction, mRestriction, but I found no Functions handling these array-elements. Possibly in a new release. A fiew use-cases are in Article.php, Title.php, but I have not seen real Group handling. Who knows more about it ? I think, this would be an often needed feature for intra-wiki solutions (like mine) --GerhardSchwarz 09:45, 4 April 2006 (UTC)

Has anyone found a solution to this question/problem? Define multiple access groups and restrict pages according to access groups? Thanks.

142.104.170.192 00:25, 18 May 2007 (UTC)

New Version?
I'm currently using 1.5.3, this patch does exactly what I need it to do, but I’m not sure if patching 1.5.3 with this outdated patch will work... I'm using it to make a wiki on the internet that is basically half inter and have intra. So that developers on my project who are all over the country can work together on the unreleased projects, but at the same time publish projects to the web and so forth. I need to have restricted pages to even begin using my wiki unfortunately, as the primary use of it will be internal developers working on an unpublished project.

mortico@yahoo.com Dec.14.2005

UPDATE: I’ve successfully installed the patch on 1.5.3 - I read the raw patch file and took note of the files that would be modified if I patched. I don't have Linux so I downloaded the archive for the pre-patched version of this mod. The pre-patched version is only 1.5.2 and contains the entire MediaWiki, and I’m using 1.5.3 and with the many modifications I’ve already made to it, I didn't want to start over. So I went through the archive of the pre-patched version and took out only the files that the patch file said it would modify. I then wrote those files over their 1.5.3 counterparts and added the prescribed lines to the localsettings.php file. After that I crossed my fingers and it worked!

To save some of you some effort if you have the same issue, I have all the modified files archived without the rest of the 1.5.2 package. Just use these files to overwrite the corresponding 1.5.3 files and it should work. You'll need to edit the LocalSettings.php manually of course.

mediawiki-1.5.2-restriction-patch-beta-0.59-repacked-for-1.5.3.rar

mortico@yahoo.com Dec.14.2005

New version of the patch for 1.5.3
In fact the patch for version 1.5.2 applies well on the 1.5.3 version. I uploaded a new version of the patch and archive for this MW version. Next time, just remind me there is a new version of MW, it will save your time :) Jej

1.6Devel
I am using 1.6devel on one of my wikis and was wondering when you might have a patch ready for 1.6devel. I could really use it! --Kf4bdy 01:03, 23 December 2005 (UTC)

1.5.4
BTW, They released a new version today 1.5.4. Just thought you would like the heads up. --Kf4bdy 01:11, 23 December 2005 (UTC)

Handy for customer support
This patch will be extremely useful for writing documentation sets which should be generally visible, but have a few sensitive pages that should be only be seen by internal staff, like internal resource planning or comments on customers. The extension to have multiple groups, so a customer could see their own page but not someone else's, would be useful, but not vital.

User:jrbray 4 Jan 06

Multiple groups needs a deeper modification of the MW security model and forms managment. I think it's better to wait for some improvements in these directions. But I understand and agree that's it's not the priority of the MW dev team for now.

Jej 09:30, 20 January 2006 (UTC)

How to patch Mediawiki running in Windows Environment?
I notice the patch command is working in Linux. How can patch it in Windows?

You can download a full patched archive. Else you can try cygwin tools... Jej 08:04, 28 April 2006 (UTC)

Just how invisible are the hidden pages?
You say that users outside the right groups cannot read, search, export etc. hidden pages, but does that also prevent hidden pages from showing up in (for instance) Recent Changes, or other special pages? Does it really filter them out from anywhere content might be leaked? (I'm using the feasibility/requirements section from Hidden_pages as a guideline) Thibgc 08:29, 9 March 2006 (UTC)


 * Update: It looks from inspecting the files that are modified by the patch that the restrictions are pretty thorough, but I'm no MediaWiki hacker. Thibgc 10:04, 9 March 2006 (UTC)


 * Yes I tried to do the best to eliminate restricted pages title from everywhere (search, rc, export, etc). Except restricted pages with regex, for whose the titles can be displayed (but pages content not viewable). A special page lists all restricted pages (for allowed members only). Jej 08:10, 28 April 2006 (UTC)


 * About that special page that lists restricted pages, it doesn't appear to be showing my list of pages, it's just empty? Any ideas? Otherwise it seems to be working great! Thanx... --D0li0 23:38, 6 December 2006 (UTC)

Recent MediaWiki versions? (e.g. 1.5.7)
Is the patch still up to date for a more recent version of MediaWiki like 1.5.7? Thibgc 08:29, 9 March 2006 (UTC)


 * Update: I see that things have been more up to date on your website, at http://conseil-recherche-innovation.net/index.php/1974/04/11/41-restrict-pages-under-mediawiki-15 Thibgc 10:02, 9 March 2006 (UTC)

Small bug
Can't figure out why (I'm no expert) but when clicking Unrestrict to unrestrict a page, the title "Confirm unrestriction" is correct, reason is correct "Reason for unrestricting:" but just above that it says "Do you really want to restrict this page?" instead of UNrestrict! Tried it several times on different pages, always the same wrong word. Looking in the Special messages file, all seems to be correct though! Can you test this and verify? Thank you - mathabaTAKETHISOUT@gmail.com 29march2006


 * Thanks, I will check and fix it. Jej 08:12, 28 April 2006 (UTC)

Problem in 1.6.7?
1.6.7 the file SpecialRecentchanges.php appears to be significantly different than what your patch suggests. Any ideas on how to include this code correctly in this version of MediaWiki? Maybe I should be in the rightfile. SpecialRecentchanges.php isn't supposed to be changed, it's SpecialRecentchangeslinked.php. I don't feel at all foolish.

Looks like I have it working, but I need to test it. I'm going to have to go through and restrict every page I want restricted (after confirming that I can actually unrestrict pages).

Also, I had to do this by hand because my shared hosting server won't allow me to use the Patch command. Hence I have a copy of all of the individual files that had to be changed for Mediawiki 1.6.7 and will post a link to them momentarily.

You can download a copy from my personal webserver here.

Please read the README.txt file, and please only do this download if you do not have the patch command available as I would like to save on my bandwidth for this website.

Dwees

Workaround
As far as I have tested, but I have little idea, it is possible to access any protected page by creating a new one pointing towards it (with the tag #REDIRECT restricted_page)... --Triuri 05:14, 20 May 2006 (UTC)


 * I have tested this and cannot seem to make it work. So as far as I can tell it does not break the protection. Version 1.6.5 patched. --Kf4bdy 19:06, 20 May 2006 (UTC)


 * I'll check the localsettings file, maybe I have done something wrong there. It's the same version.--Triuri 17:14, 21 May 2006 (UTC)


 * No problem with redirections, I confirm. Jej 08:22, 22 May 2006 (UTC)

Translation Questions (moved from article page)
Q: I translate it in /languages/MessagesCs.php, nothing happend still in English. So I translate it in Messages.php but surprisingly, it still talk in English. What I do wrong? (Test on different computers so browser cache is it not.)


 * Is the rest of the interface in Czech? Send me your MessagesCs.php so I can investigate. Thanks. Jej 08:23, 7 June 2006 (UTC)

Q: Hi I ve got the same problem with czech language. Could you help me?

Restrict Special Page
Q: Hi, How to restrict special page? Thank You


 * It's a native feature of mediawiki -> http://meta.wikimedia.org/wiki/Preventing_Access#Preventing_access_to_some_SpecialPages
 * Jej 15:42, 9 November 2006 (UTC)

UserPageRestrict=true (read,!edit)
See Page_access_restriction_with_MediaWiki as this feature has been enhanced and added to the restriction patch version beta-0.8.2

I have modified the way $wgUserPageRestrict = true; functions in order to allow users to still read, but not edit other users User: pages. They can now only edit their own user page, unless they are members of a new special group. everyone can still edit the users talk page. --D0li0 00:02, 7 December 2006 (UTC)

Perhaps this would be better if it had it's own added option like $wgUserPageRestrictReadable = true;


 * 1) In includes/Title.php comment out the return false; line in the userCanRead function for the // restricted user pages code block to allow everyone to read user pages.
 * 2) Copy that // restricted user pages code block from the userCanRead function into the userCanEdit function, see below
 * 3) Add a usereditors group to the LocalSettings.php, these users can edit other users pages.  viewrestrict users can also edit users pages, yet usereditors can not view or edit the normal restricted pages.  This could probably be changed such that only restrict and edituser are allowed to edit user pages, which may be more appropriate...

includes/Title.php commented out return false; within userCanRead function. // restricted user pages ? if ( $wgUserPageRestrict == true ) { if ( $this->getNamespace == NS_USER                            && $wgUser->getName != $this->getText ) { if ( ! $wgUser->isAllowed('viewrestrict') ) { //                                     return false; }                       };                }

includes/Title.php new userCanEdit function. function userCanEdit { global $wgUser, $wgUserPageRestrict; // restricted user pages ? if ( $wgUserPageRestrict == true ) { if ( $this->getNamespace == NS_USER                            && $wgUser->getName != $this->getText ) { if ( ( ! $wgUser->isAllowed('viewrestrict') )                                 && ( ! $wgUser->isAllowed('edituser') ) ) { return false; }                       };                }                return $this->userCan('edit'); }

Add this to LocalSettings.php for a group of users who can edit other users pages. $wgGroupPermissions['usereditors']['edituser'] = true;

Inverse Restriction
Q: Is the Inverse Restriction code instead of, or in addition to the code above it? Mensch 12:53, 23 March 2007 (UTC)

problem with the wgRestrictNewPages option
I'm having some trouble with the $wgRestrictNewPages option, It doesn't seem to work with the update for MW1.10. I have verified that it does work with MW1.6.7 and the older 0.64 patch, although the new page appears in the recent changes unlike edits to restricted pages, but that's a separate issue perhaps.

I'm not sure if I broke this in the 0.8.+ updates, or if it was broken by some previous change. perhaps the 0.70 change regarding "SQL requests are not modified anymore to check the restriction". I'm assuming that it was already broken in the 0.8 update. Can anyone verify that $wgRestrictNewPages was still working with the use of patch versions 0.70, 0.71, 0.72, or 0.8? to help track down the problem? --D0li0 22:54, 7 June 2007 (UTC)

installing the patch?
Noob: Where do I actually upload the patch to before i enter the commands? Bouncingmolar 14:08, 8 June 2007 (UTC)


 * per Page_access_restriction_with_MediaWiki
 * You place the patch in the root folder of your mediawiki installation and then run the patch command. --D0li0 10:37, 9 June 2007 (UTC)