Extension talk:Permissions

Latest comment: 15 years ago by Splarka in topic Obsolete by *what*??
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

2006

edit

Question

edit

Hi!

Appreciated you create this extension, I can quickly install it, however, when I try to add some groups, I just spent 30 minutes try to understand the example, and no lucky. I add these setting in your example:

$wg_szGroup_2_szhGroupMeaning = array( // szh ==> HTML
 'member' => 'member<br><i>(étudiant)</i>' , // étudiant (fr) == student (en)
 'publisher' => 'publisher<br><i>(professeur)</i>' , // professeur (fr) == teacher (en)
 'staff' => "this will be ignored because of the wiki definition below" ,
) ;
$wg_szRight_2_szhRightMeaning = array(
 'renameuser' => '<strike>renameuser</strike>' ,
 'release' => '<strike>release</strike>' ,
) ;

But the groups(member,publisher,staff) not shows up .

If I want to add two groups, for example, "Staff", and "Assisant", how should I do exactly ? Jameshsi 04:19, 21 January 2006 (UTC)Reply

Disabling permissions

edit

And how to disable, edit to anonymous?? -85.155.47.217 15:42, 29 January 2006

See Manual:User rights. I can see how you might expect to find that kind of information here, but this page is talking about a MediaWiki extension. Should probably be renamed somehow. -- Harry Wood 18:09, 6 March 2006 (UTC)Reply

Error message with MediaWiki v1.6.5

edit

After installing the extension I get the following error when trying to access the Special:Permission page:

Fatal error: Call to a member function on a non-object in /path/to/wiki/includes/SkinTemplate.php on line 306

--20 May 2006

The error message is probably related to the following quote from this mailing list post:
[a@kid writes:]
> I can test for the Special namespace before using $wgArticle->exists 
> () to avoid getting errors but i'm curious ... Has something changed  
> between 1.5 and 1.6 that would change the behaviour of $wgArticle- 
>  >exists() on Special Pages?

[Brion Vibber responds:]
Yes, the initialization is a bit different. It may or may not be a bug, but
$wgArticle doesn't really make sense for special pages.
In any case, a simple solution is to append these lines to the execute() function of class Permissions:
                        // Bug (?) workaround for MediaWiki 1.6.5 (and probably
                        // most if not all 1.6.x versions)
                        $wgOut->setArticleFlag( false );
--Netocrat 06:19, 23 May 2006 (UTC)Reply
were does this line of code go? I'm very new with Media Wiki and have limited knowledge of php. --12 July 2006
use find to look for "function execute()" then go down and paste it before the } at the same intentation. From a fresh instalation it will look like this:
                function execute()
                {
                        global $wgOut , $wg_zPermissionsWithConvenienceLinks ;
                        $wg_zPermissionsWithConvenienceLinks = isSet($wg_zPermissionsWithConvenienceLinks) ?
                        $wg_zPermissionsWithConvenienceLinks : Permissions_CONVENIENCE_LINKS ;
                        $szhOut = Permissions::BuildHtmlTable() ;
                        // !TODO : rely on $wgValidSpecialPagesFr to translate...
                        if($wg_zPermissionsWithConvenienceLinks)
                        {
                                $szhOut .= Permissions::BuildHtmlLink() ;
                        }
                        $wgOut->addHTML( $szhOut );
						
                        // Bug (?) workaround for MediaWiki 1.6.5 (and probably
                        // most if not all 1.6.x versions)
                        $wgOut->setArticleFlag( false );
                }
Though, my page displays "&lt;val_yes&gt;" as the values for the page, so I'm going to half to find a way to fix that. Dantman 01:53, 11 September 2006 (UTC)Reply

Wrong setting or incompatible to MediaWiki 1.7.1 ?

edit

Hi, I tried to get the extension to run but accessing the Special:Permissions page with the WikiSysop user logged in just gets me a blank page.

I created the SpecialPermissions.php file and copied it to the /includes folder and also added "include_once('includes/SpecialPermissions.php') ;" to the LocalSettings.php. At Special:SpecialPages I also have the new entry "Permissions" but as already stated above following that link will show up a blank page.

Version-info from ../index.php/Special:Version:

  • MediaWiki: 1.7.1
  • PHP: 5.1.2 (apache2handler)
  • MySQL: 5.0.18
  • Extensions:
    • Special pages:
    • Extension functions:
      • wfSpecialPermissions
    • Parser extension tags:
      • <pre>

Please mind that I'm a newbie: MediaWiki is completle new to me, so this is the first extension I try to install.

Any help appreciated. --141.41.37.95 14:00, 15 September 2006 (UTC)Reply

Ok I managed to find a workaround here
--141.41.37.95 10:15, 18 September 2006 (UTC)Reply

Another Fatal Error

edit

Any help....

Ubuntu Linux, whenever I load mysite/index.php/Special:Permissions

Fatal error: Call to a member function getUseTeX() on a non-object in /var/www/mw/includes/Parser.php on line 550

24.207.183.121 17:43, 18 November 2006 (UTC) mthurman@gmail.comReply

Same thing for me on Windows (wamp 1.6.6), with Mediawiki 1.8.2, any idea ?
--Kh3pri 12:16, 30 November 2006 (UTC)Reply
Possible solution?

I had the same error message with the extension on Mediawiki 1.8.2 - I finally resolved it to the call "$wgOut->mParserOptions" in "Wiki_2_Html". I changed that line to

, $wgOut->parserOptions()

and now the extensions executes again. --4 December 2006

I can affirm this solution! I had same problem with MW 1.8.2. ext works with change above! :)
Topfi 10:46, 12 December 2006 (UTC)Reply

Wrong values: "&lt;val_yes&gt;" instead of "Yes"

edit

(Problem occured with mediawiki 1.8.2)

There are the strings "&lt;val_yes&gt;" as value in the permission table instead of "Yes".

Possible solution

It's "quick & dirty"... see below for a better solution!

I found this on [1] (see 06-20-2006, 05:47 PM)

in SpecialPermission.php, line 243: find

$szhYes = htmlspecialchars( Permissions::Translate( 'val_yes' ) );

replace with

$szhYes = ('Yes');

--Topfi 11:07, 12 December 2006 (UTC)Reply

I think the "real" solution would be to create a page "Mediawiki:val_yes" with the content you like ("Yes" for example ;-)). 141.41.37.250 12:51, 14 December 2006 (UTC)Reply
yeah! that looks much better - thx! --Topfi 17:56, 24 January 2007 (UTC)Reply

Bad Page Rendering

edit

I am on version 1.8.2. I am getting a strange page rendering on all pages and an error when trying to goto the special:permission page.

Fatal error: Cannot access protected property OutputPage::$mParserOptions in   C:\*******************\wiki\includes\SpecialPermissions.php on line 391. Have tried all the above. --20 December 2006
One solution
Edit includes/OutputPage.php and change:
protected $mParserOptions;
to
var $mParserOptions;
Obviously some security implications here, so use at your own risk, but it did fix the problem. --25 January 2007

2007

edit

Bad Table Display

edit

I am on version 1.8.2 The cells that are supposed to be blank don't display at all. Only cells with "Yes" are displayed correctly. --1 January 2007

You can fix this by finding a line (360 in my file) that looks like this:
           $szhOut .= ( "\n  <th>".( ( $c ) ? $szhYes : ' ' )."</th>" ) ;
and changing it to look like this:
           $szhOut .= ( "\n  <th>".( ( $c ) ? $szhYes : ' ' )."</th>" ) ;
John Yesberg 05:20, 17 January 2007 (UTC)Reply

Alpha sorting

edit

I had a large number of groups to control access to a large number of namespaces, using the NamespacePermissions package. Unfortunately, the special sorting algorithm in the SpecialPermissions package chose a less-logical order (in our situation) than a straight alpha sort.

I replaced all occurrences of calls to asort and arsort to use ksort instead, and it's now sorted alphabetically.

John Yesberg 05:31, 17 January 2007 (UTC)Reply

Hiding intrinsic user groups

edit

Great extension. It was very helpful as I determine how to handle vandals...

Just a presentation question, nothing too serious, but is there any way to hide the intrinsic user groups like emailconfirmed, autoconfirmed (and for that matter bureaucrat and/or bot)?

Thanks,

24.127.115.100 04:40, 22 February 2007 (UTC)Reply

Parser

edit

im getting this error Fatal error: Call to undefined method OutputPage::parserOptions() in C:\....\www\wiki\includes\SpecialPermissions.php on line 407 tried messing a little bit with it but im still stuck at square one plz help. thnx

Thank you,

--69.95.177.50 20:36, 4 October 2007 (UTC)Reply

2008

edit

editPermissions only for the first author

edit

Hallo,

I have a question and hope that you can help me.

I search for a possibility to fix the Permissions in MediaWiki, that a articles can only edit and change by the author who has created it and this Permissions have to fix for evey article automaticly which are created by a user.

All articles of course can edit by the sysop.

I know it is a little difficult problem but hope that you can help me.

with regards Hassin my E-Mail: mial@hassin.de

See this extension. --Skizzerz talk - contribs 21:29, 16 March 2008 (UTC)Reply

2009

edit

Obsolete by *what*??

edit

This has been marked as obsolete with zero reference to the documentation of the functionality that makes it obsolete. Context failure!

Special:ListGroupRights. Splarka 13:48, 28 April 2009 (UTC)Reply
Return to "Permissions" page.