https://github.com/yugenpartners/mediawiki-extension-accesscontrol
mirror of MediaWiki extension AccessControl from https://www.thewoodcraft.org/pub/wiki/accesscontrol.git
https://github.com/yugenpartners/mediawiki-extension-accesscontrol
Last synced: 3 months ago
JSON representation
mirror of MediaWiki extension AccessControl from https://www.thewoodcraft.org/pub/wiki/accesscontrol.git
- Host: GitHub
- URL: https://github.com/yugenpartners/mediawiki-extension-accesscontrol
- Owner: yugenpartners
- License: gpl-2.0
- Created: 2021-02-02T23:39:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T23:41:13.000Z (over 4 years ago)
- Last Synced: 2025-01-27T06:43:41.382Z (5 months ago)
- Language: PHP
- Homepage: https://www.mediawiki.org/wiki/Extension:AccessControl
- Size: 124 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: changelog.txt
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
== Instalation ==
For very very quick start:1, Get source from tarball or git repository, and insert into directory
extensions/AccessControl your instance of MediaWiki2, Before activation extension you must set in your file LocalSettings.php
restricted access for the anonymous users (see below)3, And after you may add into your file LocalSettings.php the following
line:wfLoadExtension( 'AccessControl' )
This is moment is AccessControl activated and may be use to protect of pages.
== Using ==
Complet manual for using is in file AccessControl.cs.xml, which can be
imported into your wiki. For now is to disposition only version in czech
language (exported from TheWoodcraft.Org page) , but I hope than will
soon be available translate of this content into the english.If you want participated on it, you can request for access into my wiki.
See
https://www.thewoodcraft.org/wiki/AccessControl
https://www.mediawiki.org/wiki/Extension:AccessControl
https://www.mediawiki.org/wiki/Help:Extension:AccessControl (planned)== Basic config settings before activation ==
First you set allow action 'view' for all users:$wgGroupPermissions['*']['read'] = true;
An next deny access for unauthorized users for actions:
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['writeapi'] = false;
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['createpage'] = false;// If you have installed Extension:LookupUser
$wgGroupPermissions['*']['lookupuser'] = false;// If you have installed Extension:ProofreadPage
$wgGroupPermissions['*']['pagetranslation'] = false;CAUTION: Is strictly recommend set deny access for allmost of Special
pages for anonymous users! I use for it function
disableSomeSpecialPages() in my LocalSettings.php file. See:…
function disableSomeSpecialPages(&$list) {
global $wgUser;if ( is_array( $wgUser->mRights ) && in_array( 'createpage', $wgUser->mRights ) ) {
return true;
} else {
if ($wgUser->mId > 0 ) {
return true;
}
unset($list['Mypage']);
foreach( array(
'Activeusers',
'Allmessages',
'Allpages',
'Ancientpages',
'ApiSandbox',
'Blankpage',
'BlockList',
'Boilerplates',
'Booksources',
'BrokenRedirects',
'CategoryTree',
'ComparePages',
'Contributions',
'CreateCategory',
'CreateClass',
'CreateForm',
'CreateTemplate',
'Deadendpages',
'DoubleRedirects',
'ExpandTemplates',
'Export',
'ExportTranslations',
'Fewestrevisions',
'FileDuplicateSearch',
'Forms',
'FormEdit',
'FormStart',
'LanguageStats',
'LinkSearch',
'ListDuplicatedFiles',
'Listfiles',
'Listgrouprights',
'Listredirects',
'Listusers',
'Log',
'Lonelypages',
'Longpages',
'ManageMessageGroups',
'MediaStatistics',
'MessageGroupStats',
'MIMEsearch',
'Mostcategories',
'Mostimages',
'Mostinterwikis',
'Mostlinked',
'Mostlinkedcategories',
'Mostlinkedtemplates',
'Mostrevisions',
'Movepage',
'MultiPageEdit',
'Newimages',
'Newpages',
'PagesWithProp',
'PagesWithoutScans',
'PageTranslation',
'Preferences',
'Prefixindex',
'Protectedpages',
'Protectedtitles',
'RandomInCategory',
'Randompage',
'Randomredirect',
'Redirect',
'ResetTokens',
'RunQuery',
'SearchTranslations',
'Shortpages',
'Statistics',
'SupportedLanguages',
'TrackingCategories',
'Translate',
'Translations',
'TranslationStats',
'TranslationStash',
'Uncategorizedcategories',
'Uncategorizedimages',
'Uncategorizedpages',
'Uncategorizedtemplates',
'Unusedimages',
'Unusedtemplates',
'Wantedfiles',
'Wantedpages',
'Wantedtemplates',
'Watchlist',
'Withoutinterwiki'
) as $i ) {
unset( $list[$i] );
}
}
return true;
}
$wgHooks['SpecialPage_initList'][]='disableSomeSpecialPages';
…