<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Page-by-page authentication in MediaWiki</title>
	<atom:link href="http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/</link>
	<description>Mapping knowledge online since 1999</description>
	<lastBuildDate>Wed, 13 Oct 2010 15:38:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Warren</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-419031</link>
		<dc:creator>Warren</dc:creator>
		<pubDate>Thu, 17 Sep 2009 05:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-419031</guid>
		<description>Hey could somebody repost a current working 1.5 version please?
It is not working with current wiki version...

-Warren</description>
		<content:encoded><![CDATA[<p>Hey could somebody repost a current working 1.5 version please?<br />
It is not working with current wiki version&#8230;</p>
<p>-Warren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shilpa</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-33492</link>
		<dc:creator>shilpa</dc:creator>
		<pubDate>Mon, 13 Nov 2006 21:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-33492</guid>
		<description>Thanks Tim for ur reply. I will check it out.</description>
		<content:encoded><![CDATA[<p>Thanks Tim for ur reply. I will check it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Ingalls</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-32823</link>
		<dc:creator>Tim Ingalls</dc:creator>
		<pubDate>Fri, 10 Nov 2006 13:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-32823</guid>
		<description>Shilpa,

If you don&#039;t exactly need to use MediaWiki for your class, check out the DFWiki that comes with Moodle 1.5. The ACL that comes with Moodle makes it so you can start a new wiki for each class and control who sees it and who can edit it.

For a classroom situation, it works well. You can also create a read only copy of the wiki and an edit copy that students use. Once the students have improved the wiki, you can incorporate the changes into the read-only wiki and use the new wiki copy for the new class to have an even better starting point.

It&#039;s not the greatest solution for a non-class setting though, so I&#039;m hoping I can get a real ACL solution for MediaWiki to work.</description>
		<content:encoded><![CDATA[<p>Shilpa,</p>
<p>If you don&#8217;t exactly need to use MediaWiki for your class, check out the DFWiki that comes with Moodle 1.5. The ACL that comes with Moodle makes it so you can start a new wiki for each class and control who sees it and who can edit it.</p>
<p>For a classroom situation, it works well. You can also create a read only copy of the wiki and an edit copy that students use. Once the students have improved the wiki, you can incorporate the changes into the read-only wiki and use the new wiki copy for the new class to have an even better starting point.</p>
<p>It&#8217;s not the greatest solution for a non-class setting though, so I&#8217;m hoping I can get a real ACL solution for MediaWiki to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shilpa</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-32696</link>
		<dc:creator>shilpa</dc:creator>
		<pubDate>Thu, 09 Nov 2006 20:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-32696</guid>
		<description>Hi there,
The solution(coding) is quite good. However, if there are 50 users to whom I would like to restrict access to, then I would have to enter 50 users!

I am trying to figure out a simpler solution to restict users for each class of students --that is, depending on which students should be given access as per the course they enroll.
In each class, I would have around 30 students and there are so many classes in the university. It is not possible for the administrator to enter all student names for each class as it is very time consuming and  tedious.

I have been trying to figure out a solution for my problem since a few weeks. Does anyone have any suggestions to a simpler code solution?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi there,<br />
The solution(coding) is quite good. However, if there are 50 users to whom I would like to restrict access to, then I would have to enter 50 users!</p>
<p>I am trying to figure out a simpler solution to restict users for each class of students &#8211;that is, depending on which students should be given access as per the course they enroll.<br />
In each class, I would have around 30 students and there are so many classes in the university. It is not possible for the administrator to enter all student names for each class as it is very time consuming and  tedious.</p>
<p>I have been trying to figure out a solution for my problem since a few weeks. Does anyone have any suggestions to a simpler code solution?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-4706</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 26 Jun 2006 14:53:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-4706</guid>
		<description>Your code works exactly as it should but there&#039;s one design flaw.  You cant restrict the group pages themselves!  Any one can add themselves to the group just by editing the page.  I know you can restrict the page to just sysops, but this doesn&#039;t scale well if you have multiple sysops and you don&#039;t want all of them to have access to the page.

Any ideas on how we can fix this?</description>
		<content:encoded><![CDATA[<p>Your code works exactly as it should but there&#8217;s one design flaw.  You cant restrict the group pages themselves!  Any one can add themselves to the group just by editing the page.  I know you can restrict the page to just sysops, but this doesn&#8217;t scale well if you have multiple sysops and you don&#8217;t want all of them to have access to the page.</p>
<p>Any ideas on how we can fix this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Mueller</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-2632</link>
		<dc:creator>Martin Mueller</dc:creator>
		<pubDate>Wed, 10 May 2006 13:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-2632</guid>
		<description>I have made a group based version of this code, so you don&#039;t have to change every page, if a user is no more allowed to see a page.
See http://blog.pagansoft.de/index.php?/archives/12-Extension-fuer-MediaWiki-Seitenbasierte-Gruppen-Zugriffskontrolle.html#extended for details

Thanks! That was a very cool template for my very first MediaWiki extension.</description>
		<content:encoded><![CDATA[<p>I have made a group based version of this code, so you don&#8217;t have to change every page, if a user is no more allowed to see a page.<br />
See <a href="http://blog.pagansoft.de/index.php?/archives/12-Extension-fuer-MediaWiki-Seitenbasierte-Gruppen-Zugriffskontrolle.html#extended" rel="nofollow">http://blog.pagansoft.de/index.php?/archives/12-Extension-fuer-MediaWiki-Seitenbasierte-Gruppen-Zugriffskontrolle.html#extended</a> for details</p>
<p>Thanks! That was a very cool template for my very first MediaWiki extension.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rain</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-2257</link>
		<dc:creator>Rain</dc:creator>
		<pubDate>Thu, 13 Apr 2006 08:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-2257</guid>
		<description>Hello!
We have almost the same thoughts as Michael Kennedy already described. We are using the Mediawiki as a collaboration environment in a design house, which is making projects (products) for multiple customers. It would be perfect if it would be possible to publish certain pages (Product specification, requirements specification, support page, bug tracker, etc) to the customer, but deny all other pages. Basically, customer one should not see pages related to other customers or the pages that are intended for internal use. Therefore, as I see it, the system should deny viewing and editing ‘’’all’’’ pages for certain user belonging to a dedicated group (all customers should belong to the &#039;external&#039; group), except the pages that have this extra tag on it.

e.g. group=external; users=customer1,customer2..

Or even:

Hidden content …

 

Content to be published…



Hidden content …

I’m not expert in the Mediawiki internals, but it seems to me, that, in order to accomplish this the LocalSettings.php should define an array variable defining all the groups that must go through the extra content processing. If a user belonging to one of the groups accesses a page the page must contain the  (or ) tag. If not, the page is not displayed (the browser is redirected to a deny page), if yes, the allowed part of the page will be displayed.
For any other group the tag will be ignored.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hello!<br />
We have almost the same thoughts as Michael Kennedy already described. We are using the Mediawiki as a collaboration environment in a design house, which is making projects (products) for multiple customers. It would be perfect if it would be possible to publish certain pages (Product specification, requirements specification, support page, bug tracker, etc) to the customer, but deny all other pages. Basically, customer one should not see pages related to other customers or the pages that are intended for internal use. Therefore, as I see it, the system should deny viewing and editing ‘’’all’’’ pages for certain user belonging to a dedicated group (all customers should belong to the &#8216;external&#8217; group), except the pages that have this extra tag on it.</p>
<p>e.g. group=external; users=customer1,customer2..</p>
<p>Or even:</p>
<p>Hidden content …</p>
<p>Content to be published…</p>
<p>Hidden content …</p>
<p>I’m not expert in the Mediawiki internals, but it seems to me, that, in order to accomplish this the LocalSettings.php should define an array variable defining all the groups that must go through the extra content processing. If a user belonging to one of the groups accesses a page the page must contain the  (or ) tag. If not, the page is not displayed (the browser is redirected to a deny page), if yes, the allowed part of the page will be displayed.<br />
For any other group the tag will be ignored.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-2155</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 10 Mar 2006 00:33:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-2155</guid>
		<description>Hey could somebody repost a current working 1.5 version?

-Sean</description>
		<content:encoded><![CDATA[<p>Hey could somebody repost a current working 1.5 version?</p>
<p>-Sean</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juampe</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-2133</link>
		<dc:creator>Juampe</dc:creator>
		<pubDate>Sun, 05 Mar 2006 17:48:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-2133</guid>
		<description>hey the blog cuts the tag data and many authors!
sorry</description>
		<content:encoded><![CDATA[<p>hey the blog cuts the tag data and many authors!<br />
sorry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juampe</title>
		<link>http://www.epistemographer.com/2005/05/04/page-by-page-authentication-in-mediawiki/comment-page-1/#comment-2132</link>
		<dc:creator>Juampe</dc:creator>
		<pubDate>Sun, 05 Mar 2006 17:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.epistemographer.com/?p=238#comment-2132</guid>
		<description> 05/03/2006
//make accescontrol valid for users an groups
//u:juampe,g:graph,u:ruben
//Is compatible with restrict patch 
//Make ACL bypass to restrict an viewrestrict groups
//TODO: make a nice deny page

$wgExtensionFunctions[] = &quot;wfAccessControl&quot;;

        
//This is the hook function. It adds the tag to the wiki parser and 
//tells it what callback function to use.
function wfAccessControl() {
    global $wgParser;
    # register the extension with the WikiText parser
    $wgParser-&gt;setHook( &quot;accesscontrol&quot;, &quot;controlAccess&quot; );
}

// The callback function for user access
function controlAccess( $input ) {
    // Grab currently logged in user
    global $wgUser;

    //restrict viewrestrict group can bypass
    if(in_array(&#039;viewrestrict&#039;,$wgUser-&gt;mGroups)&#124;&#124;in_array(&#039;restrict&#039;,$wgUser-&gt;mGroups)){
    	return;
    }
    
    //get users	
    preg_match_all(&#039;/u:(\w+),?/&#039;,$input,$usersAccess);
    preg_match_all(&#039;/g:(\w+),?/&#039;,$input,$groupsAccess);

    //If not restriction is set, then exit and grant
    if (((!is_array($usersAccess[1])) &amp;&amp; (!is_array($groupssAccess[1]))) &#124;&#124;
	((count($usersAccess[1]) == 0) &amp;&amp; (count($usersAccess[1])))) {
        return;
    }

    $cleanedUsersAccess[] = &quot;&quot;;
    // Trim leading whitespaces from usernames
    foreach ($usersAccess[1] as $userEntry) {
        $userEntry = strtolower(ltrim($userEntry));
        array_push($cleanedUsersAccess, $userEntry);
    }

    $cleanedGroupsAccess[] = &quot;&quot;;
    // Trim leading whitespaces from usernames
    foreach ($groupsAccess[1] as $groupEntry) {
        $groupEntry = strtolower(ltrim($groupEntry));
        array_push($cleanedGroupsAccess, $groupEntry);
    }

    // Check Group access 
    foreach($cleanedGroupsAccess as $groupEntry) {
    	if(in_array($groupEntry,$wgUser-&gt;mGroups)){
	    return;
	}
    }

    // Put up an error message if current user doesn&#039;t match 
    // accesscontrol list
    if (in_array(strtolower($wgUser-&gt;getName()), $cleanedUsersAccess)) {
	return;
    }

	
    //Access Denied
    print &quot;User: &quot;.$wgUser-&gt;getName().&quot; Access Denied&quot;;
    print &quot;Group: &quot;;
    foreach($wgUser-&gt;mGroups as $groupEntry) {
        print &quot;$groupEntry &quot;;
    }
    print &quot; Access Denied&quot;;

    print &quot;Allowed users: &quot;;
    foreach($cleanedUsersAccess as $userEntry) {
    	print &quot;$userEntry &quot;;
    }

    print &quot;Allowed groups:&quot;;
    foreach($cleanedGroupsAccess as $groupEntry) {
        print &quot;$groupEntry &quot;;
    }

    exit();
}


?&gt;</description>
		<content:encoded><![CDATA[<p>05/03/2006<br />
//make accescontrol valid for users an groups<br />
//u:juampe,g:graph,u:ruben<br />
//Is compatible with restrict patch<br />
//Make ACL bypass to restrict an viewrestrict groups<br />
//TODO: make a nice deny page</p>
<p>$wgExtensionFunctions[] = &#8220;wfAccessControl&#8221;;</p>
<p>//This is the hook function. It adds the tag to the wiki parser and<br />
//tells it what callback function to use.<br />
function wfAccessControl() {<br />
    global $wgParser;<br />
    # register the extension with the WikiText parser<br />
    $wgParser-&gt;setHook( &#8220;accesscontrol&#8221;, &#8220;controlAccess&#8221; );<br />
}</p>
<p>// The callback function for user access<br />
function controlAccess( $input ) {<br />
    // Grab currently logged in user<br />
    global $wgUser;</p>
<p>    //restrict viewrestrict group can bypass<br />
    if(in_array(&#8216;viewrestrict&#8217;,$wgUser-&gt;mGroups)||in_array(&#8216;restrict&#8217;,$wgUser-&gt;mGroups)){<br />
    	return;<br />
    }</p>
<p>    //get users<br />
    preg_match_all(&#8216;/u:(\w+),?/&#8217;,$input,$usersAccess);<br />
    preg_match_all(&#8216;/g:(\w+),?/&#8217;,$input,$groupsAccess);</p>
<p>    //If not restriction is set, then exit and grant<br />
    if (((!is_array($usersAccess[1])) &amp;&amp; (!is_array($groupssAccess[1]))) ||<br />
	((count($usersAccess[1]) == 0) &amp;&amp; (count($usersAccess[1])))) {<br />
        return;<br />
    }</p>
<p>    $cleanedUsersAccess[] = &#8220;&#8221;;<br />
    // Trim leading whitespaces from usernames<br />
    foreach ($usersAccess[1] as $userEntry) {<br />
        $userEntry = strtolower(ltrim($userEntry));<br />
        array_push($cleanedUsersAccess, $userEntry);<br />
    }</p>
<p>    $cleanedGroupsAccess[] = &#8220;&#8221;;<br />
    // Trim leading whitespaces from usernames<br />
    foreach ($groupsAccess[1] as $groupEntry) {<br />
        $groupEntry = strtolower(ltrim($groupEntry));<br />
        array_push($cleanedGroupsAccess, $groupEntry);<br />
    }</p>
<p>    // Check Group access<br />
    foreach($cleanedGroupsAccess as $groupEntry) {<br />
    	if(in_array($groupEntry,$wgUser-&gt;mGroups)){<br />
	    return;<br />
	}<br />
    }</p>
<p>    // Put up an error message if current user doesn&#8217;t match<br />
    // accesscontrol list<br />
    if (in_array(strtolower($wgUser-&gt;getName()), $cleanedUsersAccess)) {<br />
	return;<br />
    }</p>
<p>    //Access Denied<br />
    print &#8220;User: &#8220;.$wgUser-&gt;getName().&#8221; Access Denied&#8221;;<br />
    print &#8220;Group: &#8220;;<br />
    foreach($wgUser-&gt;mGroups as $groupEntry) {<br />
        print &#8220;$groupEntry &#8220;;<br />
    }<br />
    print &#8221; Access Denied&#8221;;</p>
<p>    print &#8220;Allowed users: &#8220;;<br />
    foreach($cleanedUsersAccess as $userEntry) {<br />
    	print &#8220;$userEntry &#8220;;<br />
    }</p>
<p>    print &#8220;Allowed groups:&#8221;;<br />
    foreach($cleanedGroupsAccess as $groupEntry) {<br />
        print &#8220;$groupEntry &#8220;;<br />
    }</p>
<p>    exit();<br />
}</p>
<p>?&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

