Hello all. Our problem is this: a user "U1", having permission for a namespace "N1", bellonging to a group "G1" and having edit a page "N1:PAGE1" can not move a page from the custom namespace "N1" to a custom namespace "N2", after we (as sysop) indicate across user right management, that this user "U1" is a member of the group "G2" allowed to "play" in this custom namepace "N2". When we go in user right management, checking "U1" rights, we see that a sentence indicates "U1" bellongs to "G2", "G1", "user", "emailconfirmed", and to "autoconfirmed" groups. BUT: the boxes are not marked for "G2" and "G1".
You will find bellow the code for our permissions and namespace settings. What did we wrong ? Thanks a lot for your help. We are blocked with this. Antoine
--------------------------- bellow our permissions and namespace settings ---------------- # ********************************************************************* # 2. PERMISSIONS FOR ANONYMOUS # *********************************************************************
# --------------------------------------------------------------------- # 2.1 RESTRICTIONS TO ANONYMOUS FOR READING, EDITING CREATING ACCOUNT # --------------------------------------------------------------------- # source # http://www.mediawiki.org/wiki/Manual:Preventing_access
$wgGroupPermissions['*']['read'] = false; // Disable reading by anonymous users $wgGroupPermissions['*']['edit'] = false; // Disable anonymous editing $wgGroupPermissions['*']['createaccount'] = false; // Prevent new user registrations except by sysops $wgWhitelistRead = array ( "Special:Userlogin"); // But allow them to access the login page # Just add new pages to be read in brakets, after a "," and between "-" # COMMENT/DECOMMENT NEXT TO ALLOW READ MAIN PAGE, LOGIN, HELP english pages # $wgWhitelistRead = array ( "Main Page", "Special:Userlogin", "Help:Contents"); # Like previous, but for French (be careful of encoding! save file as UTF-8!) # $wgWhitelistRead = array( ":Page Principale", "Special:Userlogin", "Aide en français");
# --------------------------------------------------------------------- # 2.2 FIRST LOGIN # --------------------------------------------------------------------- # Source: # http://www.mediawiki.org/wiki/Manual:User_rights#Examples
# 2.2.1 RESTRICT EDITING TO CONFIRMED USERS ONLY # --------------------------------------------------------------------- # Disable for users, too: by default 'user' is allowed to edit, even if '*' is not. $wgGroupPermissions['user']['edit'] = false; # Make it so users with confirmed e-mail addresses are in the group $wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED; # Hide group from user list. $wgImplicitGroups[] = 'emailconfirmed'; # Finally, set it to true for the desired group. $wgGroupPermissions['emailconfirmed']['edit'] = true;
# 2.2.1 ADD MESSAGE TO THE LOGIN FORM # --------------------------------------------------------------------- # Add a message on top of the login form, to indiquate who to contact to ask for a login access: function efLoginFormMessage( &$template ) { $template->set( 'header', "Free creating account process will be soon available. While this to append, and if you wish to get an account, please send a email to smallwindturbineproj.contactor (/-\ -|-) gmail ( [)°-|- ) com INCLUDING ONLY in the subject bar of your message, this group of words (inside brackets, numbers included): {1 blue planet 1}. Other demands will not arrive to us. "); return true; } $wgHooks['UserLoginForm'][]='efLoginFormMessage';
# 2.2.3 EMAIL CONFIRMATION REQUIREMENT # --------------------------------------------------------------------- $wgEmailConfirmToEdit = true;
# 2.2.4 BLACKLIST AGAINST SPAM # --------------------------------------------------------------------- # Blacklist links towards spammer or malicious url require_once( "$IP/extensions/SpamBlacklist/SpamBlacklist.php" ); $wgSpamBlacklistFiles = array( "http://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw&am...", // Wikimedia's list // database title "DB: wikidb MediaWiki:Spam-blacklist", );
# ********************************************************************* # 6. ACCESS AND CUSTOMIZATION OF NAMESPACES # *********************************************************************
# --------------------------------------------------------------------- # 6.1 LOGIC OF NAMESPACE # ---------------------------------------------------------------------
# space 1: MAIN + PROJECT + CATEGORY: for governwriters # space 2: TEMPLATE : for wikidesigners # space 3: HELP : for wikiteachers # space 4: INCUB : for incubators # space 5: CONTRIBOX : for firstcontributors # space 6: DRAFT : for users with email confirmed # space 7: SANDBOX : for users with email confirmed # spaces 4, 5, 6, 7 are custom namespaces # sysop, bureaucrat and moderators can act in all wiki spaces # common users can play in space 6 and 7, as they want # the sandbox is open to any users # sandbox is placed in SANDBOX space # talk pages are accessible for all # Users start with Sandbox or Draft and then with Contrib # Sysop and bureaucrats can change user from one group to others
# --------------------------------------------------------------------- # 6.2 CREATION OF CUSTOM NAMESPACES # --------------------------------------------------------------------- # list of indices of custom naspaces # CONTRIBOX : 600 # INCUB : 700 # DRAFT : 800 # SANDBOX : 900 # source: http://www.mediawiki.org/wiki/Manual:$wgNamespaceProtection
# 6.2.1 defining custom namespaces # --------------------------------------------------------------------- define("NS_CONTRIBOX", 600); define("NS_CONTRIBOX_TALK", 601); define("NS_INCUB", 700); define("NS_INCUB_TALK", 701); define("NS_DRAFT", 800); define("NS_DRAFT_TALK", 801); define("NS_SANDBOX", 900); define("NS_SANDBOX_TALK", 901);
# 6.2.2 giving extranames to namespaces # --------------------------------------------------------------------- $wgExtraNamespaces = array ( 600 => "Contrib", 601 => "Contrib_talk", 700 => "Incub", 701 => "Incub_talk", 800 => "Draft", 801 => "Draft_talk", 900 => "Sandbox", 901 => "Sandbox_talk", );
# 6.2.4 unable subpages for custom namespaces # --------------------------------------------------------------------- $wgNamespacesWithSubpages[NS_CONTRIBOX] = $wgNamespacesWithSubpages[NS_INCUB] = $wgNamespacesWithSubpages[NS_DRAFT] = $wgNamespacesWithSubpages[NS_SANDBOX] = true;
# 6.2.5 include content of namespaces in statistics # --------------------------------------------------------------------- $wgContentNamespaces[] = 600; $wgContentNamespaces[] = 700; $wgContentNamespaces[] = 800; $wgContentNamespaces[] = 900;
# --------------------------------------------------------------------- # 6.3 PERMISSIONS FOR SPACE 1 # --------------------------------------------------------------------- # permission if given only to group of people with rights called # govern-edit $wgNamespaceProtection[NS_MAIN] = $wgNamespaceProtection[NS_PROJECT] = $wgNamespaceProtection[NS_CATEGORY] = array( 'govern-edit' ); # right is given only to # sysop, bureaucrat, moderators, governwriters $wgGroupPermissions['sysop']['govern-edit'] = true; $wgGroupPermissions['bureaucrat']['govern-edit'] = true; $wgGroupPermissions['moderators']['govern-edit'] = true; $wgGroupPermissions['governwriters']['govern-edit'] = true;
# ------------------------------ # Configuration of space 2: # ------------------------------ # only people with # wkdesign-edit # rights can play in space 2 $wgNamespaceProtection[NS_TEMPLATE] = array( 'wkdesign-edit' ); # sysop, bureaucrat, moderators and # wikidesigners, have # 'wkdesign-edit' rights $wgGroupPermissions['sysop']['wkdesign-edit'] = true; $wgGroupPermissions['bureaucrat']['wkdesign-edit'] = true; $wgGroupPermissions['moderators']['wkdesign-edit'] = true; $wgGroupPermissions['wikidesigners']['wkdesign-edit'] = true;
# ------------------------------ # Configuration of space 3: # ------------------------------ # only people with # wkteach-edit # rights can play in space 3 $wgNamespaceProtection[NS_HELP] = array( 'wkteach-edit' ); # sysop, bureaucrat, moderators and # wikiteachers, have # 'wkteach-edit' rights $wgGroupPermissions['sysop']['wkteach-edit'] = true; $wgGroupPermissions['bureaucrat']['wkteach-edit'] = true; $wgGroupPermissions['moderators']['wkteach-edit'] = true; $wgGroupPermissions['wikiteachers']['wkteach-edit'] = true;
# ------------------------------ # Configuration of space 4: # ------------------------------ # only people with # incub-edit # rights $wgNamespaceProtection[NS_INCUB] = array( 'incub-edit' ); # sysop, bureaucrat, moderators and # incubators, have # 'incub-edit' rights $wgGroupPermissions['sysop']['incub-edit'] = true; $wgGroupPermissions['bureaucrat']['incub-edit'] = true; $wgGroupPermissions['moderators']['incub-edit'] = true; $wgGroupPermissions['incubators']['incub-edit'] = true;
// Permissions for 'incubators' $wgGroupPermissions['incubators']['move'] = true; $wgGroupPermissions['incubators']['move-subpages'] = true; $wgGroupPermissions['incubators']['move-rootuserpages'] = true; // can move root userpages $wgGroupPermissions['incubators']['read'] = true; $wgGroupPermissions['incubators']['edit'] = true; $wgGroupPermissions['incubators']['createpage'] = true; $wgGroupPermissions['incubators']['createtalk'] = true; $wgGroupPermissions['incubators']['writeapi'] = true; $wgGroupPermissions['incubators']['upload'] = true; $wgGroupPermissions['incubators']['reupload'] = true; $wgGroupPermissions['incubators']['reupload-shared'] = true; $wgGroupPermissions['incubators']['minoredit'] = true; $wgGroupPermissions['incubators']['purge'] = true; // can use ?action=purge without clicking "ok" $wgGroupPermissions['incubators']['sendemail'] = true;
# ------------------------------ # Configuration of space 5: # ------------------------------ # only people with # contrib-edit # rights $wgNamespaceProtection[NS_CONTRIBOX] = array( 'contrib-edit' ); # sysop, bureaucrat, moderators and # firstcontributors, have # 'contrib-edit' rights $wgGroupPermissions['sysop']['contrib-edit'] = true; $wgGroupPermissions['bureaucrat']['contrib-edit'] = true; $wgGroupPermissions['moderators']['contrib-edit'] = true; $wgGroupPermissions['incubators']['contrib-edit'] = true; $wgGroupPermissions['firstcontributors']['contrib-edit'] = true;
// Permissions for 'firstcontributors' $wgGroupPermissions['firstcontributors']['move'] = true; $wgGroupPermissions['firstcontributors']['move-subpages'] = true; $wgGroupPermissions['firstcontributors']['move-rootuserpages'] = true; // can move root userpages $wgGroupPermissions['firstcontributors']['read'] = true; $wgGroupPermissions['firstcontributors']['edit'] = true; $wgGroupPermissions['firstcontributors']['createpage'] = true; $wgGroupPermissions['firstcontributors']['createtalk'] = true; $wgGroupPermissions['firstcontributors']['writeapi'] = true; $wgGroupPermissions['firstcontributors']['upload'] = true; $wgGroupPermissions['firstcontributors']['reupload'] = true; $wgGroupPermissions['firstcontributors']['reupload-shared'] = true; $wgGroupPermissions['firstcontributors']['minoredit'] = true; $wgGroupPermissions['firstcontributors']['purge'] = true; // can use ?action=purge without clicking "ok" $wgGroupPermissions['firstcontributors']['sendemail'] = true;
///////////////////////////////////////////////////////////////////////////// # next is UNCOMMENT because, space 6 and 7 should be accessible for everyone
# ------------------------------ # Configuration of space 6: // every user can, so no need to restrict # ------------------------------ # only people with # draft-edit # rights can play in space 6 # $wgNamespaceProtection[NS_DRAFT] = array( 'draft-edit' ); # sysop, bureaucrat and # emailconfirmed, have # 'draft-edit' rights # $wgGroupPermissions['sysop']['draft-edit'] = true; # $wgGroupPermissions['bureaucrat']['draft-edit'] = true; # $wgGroupPermissions['moderators']['draft-edit'] = true; # $wgGroupPermissions['firstcontributors']['draft-edit'] = true; # $wgGroupPermissions['incubators']['draft-edit'] = true; # $wgGroupPermissions['user']['draft-edit'] = true;
# ------------------------------ # Configuration of space 7: // every user can, so no need to restrict # ------------------------------ # only people with # draft-edit # rights can play in space 6 # $wgNamespaceProtection[NS_SANDBOX] = array( 'sand-edit' ); # sysop, bureaucrat and # emailconfirmed, have # 'sand-edit' rights # $wgGroupPermissions['sysop']['sand-edit'] = true; # $wgGroupPermissions['bureaucrat']['sand-edit'] = true; # $wgGroupPermissions['firstcontributors']['sand-edit'] = true; # $wgGroupPermissions['moderators']['sand-edit'] = true; # $wgGroupPermissions['incubators']['sand-edit'] = true; # $wgGroupPermissions['user']['sand-edit'] = true;
# # END OF : CUSTOMISATION OF NAMESPACES ACCESS # ////////////////////////////////////////////////////////