「MediaWikiの設定について」の版間の差分

提供: wikipokpok
移動先: 案内検索
(2rv)
(特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限))
1行目: 1行目:
== 特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限) ==
+
comment3
新しいグループを作り、そのグループに属するユーザーのみに閲覧編集等の権限を与える。
+
http://members.lycos.co.uk/ejevukanuc/market-road-thrapston.html tomlinson road bryn athyn pa
=== 1,新しいグループを作成する ===
+
http://members.lycos.co.uk/uzyfepyrihyf/sutherland-shire-map.html london a to z maps
LocalSettings.phpに$wgGroupPermissionsを追記する。<br />
+
http://members.lycos.co.uk/necohatujim/ecm-ms908c-stereo-video-microphone.html nextel model phones
+
http://members.lycos.co.uk/ybyrarek/colorado-engineering-license.html michigan paramedic license
<pre>
+
http://members.lycos.co.uk/imulesex/broad-street-apartments.html broad house hotel
$wgGroupPermissions['groupname']['move']            = true;
+
http://members.lycos.co.uk/uzyfepyrihyf/my-katana-phone.html lumenos phone number
$wgGroupPermissions['groupname']['read']            = true;
+
http://members.lycos.co.uk/qocijotul/leave-your-fishing-nets.html local fishing club
$wgGroupPermissions['groupname']['edit']            = true;
+
http://members.lycos.co.uk/ketofawu/recipes-of-butter-chicken.html recipes suitable to freeze
$wgGroupPermissions['groupname']['createpage']      = true;
+
http://members.lycos.co.uk/necohatujim/road-kelvedon-essex.html road kill trailer
$wgGroupPermissions['groupname']['createtalk']      = true;
+
http://members.lycos.co.uk/uzyfepyrihyf/farmoor-fly-fishing.html father son fishing trips
$wgGroupPermissions['groupname']['upload']          = true;
+
http://members.lycos.co.uk/yzirokosahi/manchester-university-oxford-road.html japan road atlas
$wgGroupPermissions['groupname']['reupload']        = true;
+
http://members.lycos.co.uk/akaxipoviwic/daily-health-horoscope.html daily horoscope emails
$wgGroupPermissions['groupname']['reupload-shared'] = true;
+
http://members.lycos.co.uk/uzyfepyrihyf/aveling-barford-road.html wyoming road and travel report
$wgGroupPermissions['groupname']['minoredit']      = true;
+
http://members.lycos.co.uk/mujamymys/cheltenham-road-keysborough.html chel from road to
</pre>
+
http://members.lycos.co.uk/gagesyrow/how-to-layer-cut-hair.html i get a emo haircut
特別ページのユーザー権限の管理に反映されたgroupnameを、登録ユーザーに割り当てる。。
+
http://members.lycos.co.uk/imulesex/77-samor-road.html 7688 redstone road
 
+
http://members.lycos.co.uk/uzyfepyrihyf/middletown-new-york-map.html hawaii big island road map
=== 2,新しい名前空間を作成する ===
+
http://members.lycos.co.uk/ybyrarek/gillian-mckeith-free-recipes.html osso boco recipe
LocalSettings.phpに$wgExtraNamespaces,$wgNamespacesWithSubpages, and $wgNamespacesToBeSearchedDefaultを追記する。<br />
+
http://members.lycos.co.uk/necohatujim/smores-cupcake-recipe.html somersize cheesecake recipe
+
http://members.lycos.co.uk/eqotytewe/2695-west-broadway.html 268 xizang zhong road
$wgExtraNamespaces =
+
http://members.lycos.co.uk/ybarimehe/paved-roads-in-canada.html oaklands road hanwell
      array(100 => "Hilfe",         #スペースは使えない
+
http://members.lycos.co.uk/ketofawu/6246-san-fernando-road.html 6228 e broadway ste 100  
            101 => "Hilfe_Diskussion",
+
http://members.lycos.co.uk/ybyrarek/warner-hill-road.html 10 speed road bikes
            102 => "Aide",
+
http://members.lycos.co.uk/necohatujim/raigad-telephone-directory.html find a name for a cell phone number
            103 => "Discussion_Aide"
+
http://members.lycos.co.uk/necohatujim/creative-baby-shower-gift-idea.html special birthday gift idea
            );
+
http://members.lycos.co.uk/uzyfepyrihyf/cochranes-road-moorabbin-victoria-3189.html coburn hill road craftsbury
 
+
http://members.lycos.co.uk/qocijotul/missy-road-to-stardom.html orange broadband number
<var>$wgNamespacesWithSubpages</var><br />
+
http://members.lycos.co.uk/wekinosa/map-of-the-battle-of-stalingrad.html map of the british iles
MediaWiki 1.4.x and olderの例:
+
http://members.lycos.co.uk/uzyfepyrihyf/uxbridge-road-london.html road trip maps
$wgNamespacesWithSubpages =
+
http://members.lycos.co.uk/owobeqofivo/fiberglass-windows-cost.html buy glass for windows
        array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1,
+
http://members.lycos.co.uk/imulesex/career-opportunities-in-fashion.html career opportunities online
              4 => 0, 5 => 1, 6 => 0, 7 => 1,
+
http://members.lycos.co.uk/nusiziq/majestic-theatre-tickets.html cambridge theatre tickets
              8 => 0, 9 => 1, 10 => 0,11 => 1,
+
http://members.lycos.co.uk/yzirokosahi/road-billerica-ma-01862.html road bayswater vic 3153
              '''100 => 1, 101 => 1''' );
+
http://members.lycos.co.uk/mujamymys/rolling-road-catonsville-maryland.html amtrak railroad schedule
MediaWiki 1.5.xの例:
+
http://members.lycos.co.uk/gamapej/embed-google-maps-in-flash.html toronto mapel leaf
$wgNamespacesWithSubpages = array(
+
http://members.lycos.co.uk/dejujezud/portable-office-panels.html oss portable office
NS_TALK          => true,
+
http://members.lycos.co.uk/yzirokosahi/what-caused-the-railroads-decline-in-popularity.html benz sl 550 roadster
  NS_USER          => true,
+
http://members.lycos.co.uk/wekinosa/tenterden-road-botany.html greatneck road virginia
  NS_USER_TALK      => true,
+
http://members.lycos.co.uk/necohatujim/pets-for-sale-online.html pet supplies wholesalers
  NS_PROJECT_TALK  => true,
+
http://members.lycos.co.uk/ybyrarek/wheels-on-the-road.html the secret garden broadway
  NS_IMAGE_TALK    => true,
+
http://members.lycos.co.uk/ketofawu/outlet-home-office-surge-protector-with-phone.html tunecore phone number
  NS_MEDIAWIKI_TALK => true,
+
http://members.lycos.co.uk/wekinosa/kosher-food-recipes.html coconut bread recipes
  NS_TEMPLATE_TALK  => true,
+
http://members.lycos.co.uk/owobeqofivo/anglophone-in-quebec.html disney phone directory
  NS_HELP_TALK      => true,
+
http://members.lycos.co.uk/uzyfepyrihyf/maple-creme-brulee.html maple global to
  NS_CATEGORY_TALK  => true,
+
http://members.lycos.co.uk/imulesex/cheapest-broadband-deals.html 2wd off road
  '''100               => true,'''
+
http://members.lycos.co.uk/dejujezud/sturgeon-fishing-ontario.html fluorocarbon fishing knots
  '''101              => true'''
+
http://members.lycos.co.uk/wekinosa/book-buying-and-selling.html buy a book of shadows
);
+
http://members.lycos.co.uk/eqotytewe/maison-du-telephone.html discount on phones
 
+
http://members.lycos.co.uk/gagesyrow/700-broadway-westwood-nj.html gchq hubble road
<var>$wgNamespacesToBeSearchedDefault</var><br />
+
http://members.lycos.co.uk/nusiziq/the-world-mape.html free malaysia maps
MediaWiki 1.4.x and olderの例:
+
http://members.lycos.co.uk/gamapej/google-road-maps-uk.html road construction contractor
$wgNamespacesToBeSearchedDefault =
+
http://members.lycos.co.uk/gagesyrow/road-otumoetai-tauranga.html road ottertail mn 56571
        array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0,
+
                4 => 0, 5 => 0, 6 => 0, 7 => 0,
+
                8 => 0, 9 => 1, 10 => 0, 11 => 1,
+
                '''100 => 1, 101 => 1''' );
+
 
+
MediaWiki 1.5.xの例:
+
$wgNamespacesToBeSearchedDefault = array( -1 => 0, NS_MAIN => 1, NS_USER => 0,
+
  NS_USER_TALK => 0, NS_PROJECT_TALK => 0, NS_IMAGE_TALK => 0,
+
  NS_IMAGE_TALK => 0, NS_TEMPLATE_TALK => 0, NS_HELP_TALK => 0,
+
  NS_CATEGORY_TALK => 0,
+
  '''100 => 1, 101 => 1''' );
+
 
+
=== 3,Title.php (includes/Title.php)を書き換える ===
+
Title.php (old)
+
 
+
if( $wgUser->isAllowed('read') ) {
+
return true;
+
} else {
+
global $wgWhitelistRead;
+
Title.php (new)
+
 
+
if( $wgUser->isAllowed('read') ) {
+
        if( $this->getNamespace() == 100 ) {
+
if( $wgUser->isAllowed('viewforbidden') ) {
+
return true;
+
} else {
+
return false;
+
}
+
} else {
+
return true;
+
}
+
} else {
+
+
global $wgWhitelistRead;
+
 
+
===4,LocalSettings.phpを編集する===
+
 
+
$wgGroupPermissionsを追記する。
+
 
+
$wgGroupPermissions['groupname']['viewforbidden'] = true;
+
 
+
以上で、グループを与えられたユーザーしか、その名前空間にアクセスできできなくなる。
+
 
+
=== 参考ページ ===
+
http://meta.wikimedia.org/wiki/Preventing_Access
+
  
 
== 特別ページの画像リスト等にパーミッションを設定する ==
 
== 特別ページの画像リスト等にパーミッションを設定する ==

2009年1月16日 (金) 12:32時点における版

comment3 http://members.lycos.co.uk/ejevukanuc/market-road-thrapston.html tomlinson road bryn athyn pa http://members.lycos.co.uk/uzyfepyrihyf/sutherland-shire-map.html london a to z maps http://members.lycos.co.uk/necohatujim/ecm-ms908c-stereo-video-microphone.html nextel model phones http://members.lycos.co.uk/ybyrarek/colorado-engineering-license.html michigan paramedic license http://members.lycos.co.uk/imulesex/broad-street-apartments.html broad house hotel http://members.lycos.co.uk/uzyfepyrihyf/my-katana-phone.html lumenos phone number http://members.lycos.co.uk/qocijotul/leave-your-fishing-nets.html local fishing club http://members.lycos.co.uk/ketofawu/recipes-of-butter-chicken.html recipes suitable to freeze http://members.lycos.co.uk/necohatujim/road-kelvedon-essex.html road kill trailer http://members.lycos.co.uk/uzyfepyrihyf/farmoor-fly-fishing.html father son fishing trips http://members.lycos.co.uk/yzirokosahi/manchester-university-oxford-road.html japan road atlas http://members.lycos.co.uk/akaxipoviwic/daily-health-horoscope.html daily horoscope emails http://members.lycos.co.uk/uzyfepyrihyf/aveling-barford-road.html wyoming road and travel report http://members.lycos.co.uk/mujamymys/cheltenham-road-keysborough.html chel from road to http://members.lycos.co.uk/gagesyrow/how-to-layer-cut-hair.html i get a emo haircut http://members.lycos.co.uk/imulesex/77-samor-road.html 7688 redstone road http://members.lycos.co.uk/uzyfepyrihyf/middletown-new-york-map.html hawaii big island road map http://members.lycos.co.uk/ybyrarek/gillian-mckeith-free-recipes.html osso boco recipe http://members.lycos.co.uk/necohatujim/smores-cupcake-recipe.html somersize cheesecake recipe http://members.lycos.co.uk/eqotytewe/2695-west-broadway.html 268 xizang zhong road http://members.lycos.co.uk/ybarimehe/paved-roads-in-canada.html oaklands road hanwell http://members.lycos.co.uk/ketofawu/6246-san-fernando-road.html 6228 e broadway ste 100 http://members.lycos.co.uk/ybyrarek/warner-hill-road.html 10 speed road bikes http://members.lycos.co.uk/necohatujim/raigad-telephone-directory.html find a name for a cell phone number http://members.lycos.co.uk/necohatujim/creative-baby-shower-gift-idea.html special birthday gift idea http://members.lycos.co.uk/uzyfepyrihyf/cochranes-road-moorabbin-victoria-3189.html coburn hill road craftsbury http://members.lycos.co.uk/qocijotul/missy-road-to-stardom.html orange broadband number http://members.lycos.co.uk/wekinosa/map-of-the-battle-of-stalingrad.html map of the british iles http://members.lycos.co.uk/uzyfepyrihyf/uxbridge-road-london.html road trip maps http://members.lycos.co.uk/owobeqofivo/fiberglass-windows-cost.html buy glass for windows http://members.lycos.co.uk/imulesex/career-opportunities-in-fashion.html career opportunities online http://members.lycos.co.uk/nusiziq/majestic-theatre-tickets.html cambridge theatre tickets http://members.lycos.co.uk/yzirokosahi/road-billerica-ma-01862.html road bayswater vic 3153 http://members.lycos.co.uk/mujamymys/rolling-road-catonsville-maryland.html amtrak railroad schedule http://members.lycos.co.uk/gamapej/embed-google-maps-in-flash.html toronto mapel leaf http://members.lycos.co.uk/dejujezud/portable-office-panels.html oss portable office http://members.lycos.co.uk/yzirokosahi/what-caused-the-railroads-decline-in-popularity.html benz sl 550 roadster http://members.lycos.co.uk/wekinosa/tenterden-road-botany.html greatneck road virginia http://members.lycos.co.uk/necohatujim/pets-for-sale-online.html pet supplies wholesalers http://members.lycos.co.uk/ybyrarek/wheels-on-the-road.html the secret garden broadway http://members.lycos.co.uk/ketofawu/outlet-home-office-surge-protector-with-phone.html tunecore phone number http://members.lycos.co.uk/wekinosa/kosher-food-recipes.html coconut bread recipes http://members.lycos.co.uk/owobeqofivo/anglophone-in-quebec.html disney phone directory http://members.lycos.co.uk/uzyfepyrihyf/maple-creme-brulee.html maple global to http://members.lycos.co.uk/imulesex/cheapest-broadband-deals.html 2wd off road http://members.lycos.co.uk/dejujezud/sturgeon-fishing-ontario.html fluorocarbon fishing knots http://members.lycos.co.uk/wekinosa/book-buying-and-selling.html buy a book of shadows http://members.lycos.co.uk/eqotytewe/maison-du-telephone.html discount on phones http://members.lycos.co.uk/gagesyrow/700-broadway-westwood-nj.html gchq hubble road http://members.lycos.co.uk/nusiziq/the-world-mape.html free malaysia maps http://members.lycos.co.uk/gamapej/google-road-maps-uk.html road construction contractor http://members.lycos.co.uk/gagesyrow/road-otumoetai-tauranga.html road ottertail mn 56571

特別ページの画像リスト等にパーミッションを設定する

$wgGroupPermissions['sysop']['imagelist']   = true;
$wgGroupPermissions['sysop']['newimages']   = true;
$wgGroupPermissions['sysop']['log']   = true;

LocalSettings.phpに追記する。