Hi,
Is anyone using MW-BB, a discussion forum extension for MW? I would like to know how can I extend the MW search to search for the forum postings
Regards, Jack Eapen C SunTec Knowledge Centre ------------------------------------------------------------------------------------
This electronic mail (including any attachment thereto) may be confidential and privileged and is intended only for the individual or entity named above. Any unauthorized use, printing, copying, disclosure or dissemination of this communication may be subject to legal restriction or sanction. Accordingly, if you are not the intended recipient, please notify the sender by replying to this email immediately and delete this email (and any attachment thereto) from your computer system...Thank You
Hi guys, Just one quick question, is there a way to limit people's access to the "export" function? I don't really need "nuclear secrets" level of security and protection, but I'm just trying to implement a few "don't steal all my stuff" measures.
Thanks, Brett
Brett O'Donnell a écrit :
Hi guys, Just one quick question, is there a way to limit people's access to the "export" function? I don't really need "nuclear secrets" level of security and protection, but I'm just trying to implement a few "don't steal all my stuff" measures.
you *can* slightly modify includes/SpecialExport.php and LocalSettings.php :
in includes/SpecialExport.php add global $wgUser and check 'export' permission :
function wfSpecialExport( $page = '' ) { global $wgOut, $wgRequest, $wgExportAllowListContributors; global $wgExportAllowHistory, $wgExportMaxHistory; /*ADD THIS*/ global $wgUser; if ( !$wgUser->isAllowed('export') ) { $wgOut->addWikiText( wfMsg( "noexportallowed" ) ); return; }
/*FILE CONTINUES*/ $curonly = true; $doexport = false;
in LocalSettings.php, simply give any group the 'export' permission. e.g. : $wgGroupPermissions['sysop']['export'] = true; //gives export permission to sysop group
Finally, create a page in your wiki named : Mediawiki:Noexportallowed and put some text in it (e.g. "you must be an admin to use export special page")
NB : you'll have to make these changes (and possibly adapt them) each time you upgrade mediawiki to newer version NB2 : I'm sure I've already seen how to do this in LocalSettings.php without hacking the core code, but I can't remember how (it wasn't a hook it was a kind of function overwriting)
On 19/06/07, Alexis Moinet alexis.moinet@fpms.ac.be wrote:
Finally, create a page in your wiki named : Mediawiki:Noexportallowed and put some text in it (e.g. "you must be an admin to use export special page")
The normal method is to call $wgOut->permissionRequired( 'export' );
NB2 : I'm sure I've already seen how to do this in LocalSettings.php without hacking the core code, but I can't remember how (it wasn't a hook it was a kind of function overwriting)
Perhaps conditional removal of the special page if the user doesn't have permission to use it? An example might be http://mediawiki.pastey.net/57133-2mn5.
Rob Church
Rob Church wrote :
On 19/06/07, Alexis Moinet alexis.moinet-LfqbaU+xhLyZIoH1IeqzKA@public.gmane.org wrote:
Finally, create a page in your wiki named : Mediawiki:Noexportallowed and put some text in it (e.g. "you must be an admin to use export special page")
The normal method is to call $wgOut->permissionRequired( 'export' );
NB2 : I'm sure I've already seen how to do this in LocalSettings.php without hacking the core code, but I can't remember how (it wasn't a hook it was a kind of function overwriting)
Perhaps conditional removal of the special page if the user doesn't have permission to use it? An example might be http://mediawiki.pastey.net/57133-2mn5.
Thank you Rob
(for the "conditional removal", that's not the solution I was thinking about, but yours is actually simpler and cleaner ;-) )
mediawiki-l@lists.wikimedia.org