Extension talk:Restrict access by category and group

Modificatins and updates.

v: 1.01

 * Supressed warning when you don't define $wgWhitelistRead array.

Error: Headers already sent

 * Hi, when I add your extension I get some "Headers already sent" errors on my wiki. I'm shure I installed the stuff properly. --JazzmanDE 14:14, 17 September 2008 (UTC)


 * Solution:
 * You must put the code into  tags (no more spaces neither blank lines before/after the block). If do not, you get this message because php thinks that is html not php code. See installation section for more detail.
 * Thanks! --JazzmanDE 14:53, 22 September 2008 (UTC)


 * Hi, I'm getting this Error:
 * Warning: Cannot modify header information - headers already sent by (output started at ::C:\xampp\htdocs\MinjusWiki\LocalSettings.php:1) in C:\xampp\htdocs\MinjusWiki\includes\WebResponse.php on line 10


 * Warning: Cannot modify header information - headers already sent by (output started at ::C:\xampp\htdocs\MinjusWiki\LocalSettings.php:1) in C:\xampp\htdocs\MinjusWiki\includes\WebResponse.php on line 10 --JimHawk 10:24, 18 November 2008 (UTC)


 * Trace:
 * Did you put require_once("$IP/extensions/rabcg/rabcg.php"); between  tags in your LocalSettings.php? Nearly all LocalSettings.php files are . So you must put it between ". Therefore I've made a provisional one (?>) an I've put the line there after between "". Both methods had the same result ("Warning: Cannot modify header information - headers already sent by..."). Is it possible that the problem depends on the fact that i possess another language version of Mediawiki as english? Thanks in advance. --JimHawk 09:21, 19 November 2008 (UTC)


 * No, It is language independent. ?> tag isn't necessary. I think that the problem is in rabcg.php and/or groups.php. Is important that there isn't any blank line neither spaces before <?php tag. This tag must be the first thing in these files. Is this correct in your files? --Lodopidolo 18:19, 24 November 2008 (UTC)


 * Yes, i have no blank lines or spaces before <?php Tag. It's really the first thing in my files. Must i install something else, unless the ExtensionFunctions.php, rabcp.php and the groups.php files? --JimHawk 07:49, 25 November 2008 (UTC)


 * No, nothing more. If you want, you can send me the files (LocalSettings.php, rabcg.php and groups.php) and I'll see them. Delete all private information. --Lodopidolo 08:29, 25 November 2008 (UTC)


 * Solution:
 * There was blank spaces before <?php Tag.

This Error Occurs During Execution. Any one can tell me about this error.

Warning: Cannot modify header information - headers already sent by (output started at /home/skippers/public_html/includes/DefaultSettings.php:1) in /home/skippers/public_html/includes/WebResponse.php on line 16

Error: array_key_exists

 * Hi, followed your installation instructions and get the following error repeated 30 odd times at the top of every wiki page:

Warning: array_key_exists [function.array-key-exists]: The second argument should be either an array or an object in   /var/lib/mediawiki/extensions/rabcg/rabcg.php on line 41

Cheers


 * Trace:
 * How many times have you declared groups array variables? If you declare it in groups.php you must not declare anyone in rabcg.php and viceversa. Can you tell me more?


 * Solution:
 * Solved. --Lodopidolo 09:51, 26 November 2008 (UTC)

Error on login

 * I have the Special:UserLogin page in the whitelist array, but I cannot access it while browsing as anon. Any ideas?  -Tom


 * Trace:
 * Mediawiki is case sensivity. I think the problem is that correct name (of the page) is Special:Userlogin. Please, try this and tell me more. --Lodopidolo 16:52, 24 December 2008 (UTC)
 * Solution:
 * Solved. Perhaps there wasn't any error. --Lodopidolo 22:23, 15 January 2009 (UTC)

Can't edit user groups

 * All the groups I try to add the user to as admin it wont save the custom groups :( everything else works fine why wont it save my user group permissions.


 * Looks like you can edit groups but they are limited to 16 Characters, i have changed the restriction in the database anyone know where it is in the code ? still wont work.


 * Trace:
 * I don't understand you. Please, explain me what is the problem. Groups must be added in your groups.php file. After you must assign that group to a document as a category name. --Lodopidolo 22:33, 15 January 2009 (UTC)


 * Solution:
 * Perhaps there wasn't any problem. Nobody contacts. --Lodopidolo 16:05, 29 January 2009 (UTC)

Anonymous Acces to public doc

 * I would like to enable anonymous users to read all public articles. I tried a little bit with $wgGroupPermissions, but couldn't figure it out. Is ther any somehow not too difficult mod for this?
 * greets --Malte Mertz 15:25, 19 February 2009 (UTC)


 * Trace:
 * You have two options:
 * You can put all public page you want to access by anonymous user as White pages. In this case all white pages are accessed by every body.
 * You can modify your $IP/extensions/rabcg/rabcg.php, where put:
 * by:
 * Try this and tell me if this is correct. --Lodopidolo 17:18, 19 February 2009 (UTC)
 * Try this and tell me if this is correct. --Lodopidolo 17:18, 19 February 2009 (UTC)
 * Try this and tell me if this is correct. --Lodopidolo 17:18, 19 February 2009 (UTC)

Yeah, it works, very cool. Muchas gracias!--Malte Mertz 16:26, 26 February 2009 (UTC)


 * This was very useful tip as the main need is to restrict just some pages :D Thanks a lot! --Teemuo 07:01, 31 July 2009 (UTC)

Can't Assign Right to User
The extension loaded properly, but the wiki won't save any changes when I try to assign the right to a user. Below is my only line in the groups.php file:

$wgGroupPermissions['Private Data']['private'] = true;

Using 1.13.3 --Leoottawa 22:19, 9 March 2009 (UTC)

Update
Looks like the problem is with spaces. I was able to assign the group PrivateData to a user. --Leoottawa 22:25, 9 March 2009 (UTC)

same here
I too have the same problem with group names containing spaces. It doesn't work with spaces, but works without.

Preventing public adding a page to private category

 * Is there a way to prevent anonymous editors adding a page to a private category? -- Anon., 17:05, 22 March 2009 (UTC)


 * I'm no expert on the issue but I think that would require a lot more complex hack to the mediawiki.. Not sure though. --Teemuo 08:43, 31 July 2009 (UTC)

Usergroups loosing members
I have added line to groups.php $wgGroupPermissions['RestrictedGroup']['private'] = true;

And I have also used the change in topic Anonymous Access to public doc.

The group keeps loosing its members at random intervals - when I log in as admin - I see only the group but no members attached to it.

I'm also using the Extension:LDAP_Authentication -plug-in - should that make any difference.

Any idea why the users lose their membership?


 * Trace:
 * Hi, I don't understand you. I am usign Extension:LDAP_Authentication extension too and I haven't any problem with Extension:Restrict_access_by_category_and_group. Please, explain me more. --Lodopidolo 11:46, 14 September 2009 (UTC)


 * Mr.Montesa:
 * Hello, I do have the same problems on my newly installed Wiki (15.1). I'm using the Extension:LDAP_Authentication extension too, but I don't think that it interacts with that problem. Local users loose their membership too. Here's my setup.

I want to prevent users from seeing some pages with confidential content by categories. A page disabled is added to category: CONFIDENT. groups.php's content: $wgGroupPermissions['CONFIDENT']['private'] = true; Then, I configured a user via Special:UserRights to be member of the CONFIDENT group by ticking the box and saved.

After logging out the user and relogging in, I'm not longer able to view the pages with category CONFIDENT. Checking the user I see that the box is unticked again.

If you need further details, let me know. --Mr.Montesa 11:43, 26 Oktober 2009

Not working in mediawiki 1.15.1
Here is my groups.php:

<?php $wgGroupPermissions['TestPrivateGroup']['private'] = true;

Here is version info: MediaWiki	1.15.1

PHP	5.2.6 (apache2handler)

MySQL	5.0.6

Here's my problem:

I have added a user to the TestPrivateGroup group via the user rights management 'special page'. I have created a page with at the bottom, yet there are no restrictions on access, everyone can see the page, even not logged in users. Am I doing anything wrong or does this not work in the latest version of MediaWiki. Thanks. 08:10, 13 October 2009 (UTC)

Confidential pages of several levels
To optimize the confidential pages of several levels. --PiFi 12:12, 28 February 2010 (UTC)