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

提供: wikipokpok
移動先: 案内検索
(rv/v)
(特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限))
1行目: 1行目:
== 特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限) ==
+
comment3
新しいグループを作り、そのグループに属するユーザーのみに閲覧編集等の権限を与える。
+
http://12.kysttwecom.com/broad-st-hamilton.html broad disc bulging
=== 1,新しいグループを作成する ===
+
http://2.kysttwecom.com/recipe-for-fried-porkchops.html recipe for dahi bhalla
LocalSettings.phpに$wgGroupPermissionsを追記する。<br />
+
http://5.kysttwecom.com/adobe-photoshop-cs3-extended-keygen-download.html download photoshop cs3 without
+
http://6.kysttwecom.com/chicken-recipes-barbeque.html chinese chicken salad recipe
<pre>
+
http://1.kysttwecom.com/lightning-shared-calendar.html line calendar 2004
$wgGroupPermissions['groupname']['move']            = true;
+
http://18.kysttwecom.com/natural-maple-gibson-grabber-bass.html seadrift texas map
$wgGroupPermissions['groupname']['read']            = true;
+
http://9.kysttwecom.com/mobile-phone-deals-with-free-xbox-360.html mobile phone jammer hong
$wgGroupPermissions['groupname']['edit']            = true;
+
http://2.kysttwecom.com/cell-culture-video.html color in chinese culture
$wgGroupPermissions['groupname']['createpage']      = true;
+
http://20.kysttwecom.com/on-rohrerstown-road.html sale abinger road
$wgGroupPermissions['groupname']['createtalk']      = true;
+
http://6.kysttwecom.com/a-european-travel.html places to travel in eastern europe
$wgGroupPermissions['groupname']['upload']          = true;
+
http://16.kysttwecom.com/human-resources-jobs-nj.html human resources coordinator job description
$wgGroupPermissions['groupname']['reupload']        = true;
+
http://1.kysttwecom.com/baby-names-british.html muslim baby boys names
$wgGroupPermissions['groupname']['reupload-shared'] = true;
+
http://13.kysttwecom.com/dirt-road-home.html fencepiece road hainault
$wgGroupPermissions['groupname']['minoredit']      = true;
+
http://4.kysttwecom.com/silkroad-europe-armor.html 3710 richmond road
</pre>
+
http://11.kysttwecom.com/map-of-bundaburg.html map of caledonia michigan
特別ページのユーザー権限の管理に反映されたgroupnameを、登録ユーザーに割り当てる。。
+
http://10.kysttwecom.com/map-of-ancient-earth.html map of anahuac
 
+
http://18.kysttwecom.com/henderson-nevada-89015.html storage in henderson nevada
=== 2,新しい名前空間を作成する ===
+
http://17.kysttwecom.com/1358-ayrault-road-fairport-ny.html 1351 s college mall road bloomington in
LocalSettings.phpに$wgExtraNamespaces,$wgNamespacesWithSubpages, and $wgNamespacesToBeSearchedDefaultを追記する。<br />
+
http://10.kysttwecom.com/recipe-for-apple-crumb-pie.html recipe for apple pie
+
http://17.kysttwecom.com/indian-sweets-recipe.html walnut salad recipe
$wgExtraNamespaces =
+
http://18.kysttwecom.com/mood-saxophone-music.html mood saxophone music
      array(100 => "Hilfe",         #スペースは使えない
+
http://20.kysttwecom.com/hessle-road-in-hull.html napa wine road
            101 => "Hilfe_Diskussion",
+
http://12.kysttwecom.com/masters-fishing-tournament.html online fishing log
            102 => "Aide",
+
http://18.kysttwecom.com/fishing-torres-del-paine.html fishing tackel on
            103 => "Discussion_Aide"
+
http://2.kysttwecom.com/where-can-i-buy-lottery-tickets.html where can i buy movie tickets online
            );
+
http://15.kysttwecom.com/deep-sea-fishing-daytona-beach-florida.html folding fishing poles
 
+
http://6.kysttwecom.com/read-free-audio-books.html reading a book clipart
<var>$wgNamespacesWithSubpages</var><br />
+
http://14.kysttwecom.com/verizion-phone-number.html high quality headset microphone
MediaWiki 1.4.x and olderの例:
+
http://7.kysttwecom.com/chinese-calendar-rat.html chinese calendar year of the monkey
$wgNamespacesWithSubpages =
+
http://17.kysttwecom.com/site-map-tool.html california wildfires maps
        array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1,
+
http://6.kysttwecom.com/serial-microsoft-office-2003.html microsoft office 2000 serial
              4 => 0, 5 => 1, 6 => 0, 7 => 1,
+
http://10.kysttwecom.com/lincoln-park-chicago-jobs.html metra chicago jobs
              8 => 0, 9 => 1, 10 => 0,11 => 1,
+
http://14.kysttwecom.com/road-e12-6aq.html road dun laoire
              '''100 => 1, 101 => 1''' );
+
http://8.kysttwecom.com/county-delaware-map.html penn station map
MediaWiki 1.5.xの例:
+
http://9.kysttwecom.com/tomtom-usa-and-canada-map.html tomtom one france map
$wgNamespacesWithSubpages = array(
+
http://19.kysttwecom.com/bruce-springsteen-tickets-gillette.html bruce springsteen tickets gillette
NS_TALK          => true,
+
http://5.kysttwecom.com/london-road-northend-portsmouth.html london road morden surrey sm4
  NS_USER          => true,
+
http://2.kysttwecom.com/creek-expressway-maps.html createfilemapping vista access
  NS_USER_TALK      => true,
+
http://6.kysttwecom.com/fishing-shop-seattle.html fishing supplies new york
  NS_PROJECT_TALK  => true,
+
http://1.kysttwecom.com/iceland-flight-tickets.html www flightnetwork com etickets
  NS_IMAGE_TALK    => true,
+
http://10.kysttwecom.com/cell-phone-telephone-lookup.html free cell phone lookup name
  NS_MEDIAWIKI_TALK => true,
+
http://3.kysttwecom.com/science-museum-launch-ball.html science museum nearest tube station
  NS_TEMPLATE_TALK  => true,
+
http://5.kysttwecom.com/desktop-background-free.html desktop backgrounds nature
  NS_HELP_TALK      => true,
+
http://9.kysttwecom.com/long-road-to-ruin-lyrics-meaning.html long long road out of eden
  NS_CATEGORY_TALK  => true,
+
http://18.kysttwecom.com/wireless-headphone-receiver.html wireless headphone receiver
  '''100              => true,'''
+
http://12.kysttwecom.com/isolating-a-pure-culture.html sdma culture and cocktails
  '''101              => true'''
+
http://13.kysttwecom.com/do-fibroadenomas-grow.html trouts road corridor
);
+
http://8.kysttwecom.com/audi-allroad-0.html youtub broadcast yourself
 
+
http://17.kysttwecom.com/mapy-do-sciagniecia.html maps quebec canada
<var>$wgNamespacesToBeSearchedDefault</var><br />
+
http://14.kysttwecom.com/prepaid-wireless-phone-card.html prepaid phone call
MediaWiki 1.4.x and olderの例:
+
http://10.kysttwecom.com/maple-gold-coin.html mapas y direcciones
$wgNamespacesToBeSearchedDefault =
+
http://7.kysttwecom.com/2401c-millstream-road.html road ballston spa ny 12020
        array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0,
+
http://8.kysttwecom.com/chocolate-orange-recipes.html chocolate panforte recipe
                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月18日 (日) 21:36時点における版

comment3 http://12.kysttwecom.com/broad-st-hamilton.html broad disc bulging http://2.kysttwecom.com/recipe-for-fried-porkchops.html recipe for dahi bhalla http://5.kysttwecom.com/adobe-photoshop-cs3-extended-keygen-download.html download photoshop cs3 without http://6.kysttwecom.com/chicken-recipes-barbeque.html chinese chicken salad recipe http://1.kysttwecom.com/lightning-shared-calendar.html line calendar 2004 http://18.kysttwecom.com/natural-maple-gibson-grabber-bass.html seadrift texas map http://9.kysttwecom.com/mobile-phone-deals-with-free-xbox-360.html mobile phone jammer hong http://2.kysttwecom.com/cell-culture-video.html color in chinese culture http://20.kysttwecom.com/on-rohrerstown-road.html sale abinger road http://6.kysttwecom.com/a-european-travel.html places to travel in eastern europe http://16.kysttwecom.com/human-resources-jobs-nj.html human resources coordinator job description http://1.kysttwecom.com/baby-names-british.html muslim baby boys names http://13.kysttwecom.com/dirt-road-home.html fencepiece road hainault http://4.kysttwecom.com/silkroad-europe-armor.html 3710 richmond road http://11.kysttwecom.com/map-of-bundaburg.html map of caledonia michigan http://10.kysttwecom.com/map-of-ancient-earth.html map of anahuac http://18.kysttwecom.com/henderson-nevada-89015.html storage in henderson nevada http://17.kysttwecom.com/1358-ayrault-road-fairport-ny.html 1351 s college mall road bloomington in http://10.kysttwecom.com/recipe-for-apple-crumb-pie.html recipe for apple pie http://17.kysttwecom.com/indian-sweets-recipe.html walnut salad recipe http://18.kysttwecom.com/mood-saxophone-music.html mood saxophone music http://20.kysttwecom.com/hessle-road-in-hull.html napa wine road http://12.kysttwecom.com/masters-fishing-tournament.html online fishing log http://18.kysttwecom.com/fishing-torres-del-paine.html fishing tackel on http://2.kysttwecom.com/where-can-i-buy-lottery-tickets.html where can i buy movie tickets online http://15.kysttwecom.com/deep-sea-fishing-daytona-beach-florida.html folding fishing poles http://6.kysttwecom.com/read-free-audio-books.html reading a book clipart http://14.kysttwecom.com/verizion-phone-number.html high quality headset microphone http://7.kysttwecom.com/chinese-calendar-rat.html chinese calendar year of the monkey http://17.kysttwecom.com/site-map-tool.html california wildfires maps http://6.kysttwecom.com/serial-microsoft-office-2003.html microsoft office 2000 serial http://10.kysttwecom.com/lincoln-park-chicago-jobs.html metra chicago jobs http://14.kysttwecom.com/road-e12-6aq.html road dun laoire http://8.kysttwecom.com/county-delaware-map.html penn station map http://9.kysttwecom.com/tomtom-usa-and-canada-map.html tomtom one france map http://19.kysttwecom.com/bruce-springsteen-tickets-gillette.html bruce springsteen tickets gillette http://5.kysttwecom.com/london-road-northend-portsmouth.html london road morden surrey sm4 http://2.kysttwecom.com/creek-expressway-maps.html createfilemapping vista access http://6.kysttwecom.com/fishing-shop-seattle.html fishing supplies new york http://1.kysttwecom.com/iceland-flight-tickets.html www flightnetwork com etickets http://10.kysttwecom.com/cell-phone-telephone-lookup.html free cell phone lookup name http://3.kysttwecom.com/science-museum-launch-ball.html science museum nearest tube station http://5.kysttwecom.com/desktop-background-free.html desktop backgrounds nature http://9.kysttwecom.com/long-road-to-ruin-lyrics-meaning.html long long road out of eden http://18.kysttwecom.com/wireless-headphone-receiver.html wireless headphone receiver http://12.kysttwecom.com/isolating-a-pure-culture.html sdma culture and cocktails http://13.kysttwecom.com/do-fibroadenomas-grow.html trouts road corridor http://8.kysttwecom.com/audi-allroad-0.html youtub broadcast yourself http://17.kysttwecom.com/mapy-do-sciagniecia.html maps quebec canada http://14.kysttwecom.com/prepaid-wireless-phone-card.html prepaid phone call http://10.kysttwecom.com/maple-gold-coin.html mapas y direcciones http://7.kysttwecom.com/2401c-millstream-road.html road ballston spa ny 12020 http://8.kysttwecom.com/chocolate-orange-recipes.html chocolate panforte recipe

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

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

LocalSettings.phpに追記する。