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

提供: wikipokpok
移動先: 案内検索
(特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限))
1行目: 1行目:
== 特定の権限を与えられたユーザーのみアクセスできる名前空間を作る(特定ページへのアクセス制限) ==
+
comment1
新しいグループを作り、そのグループに属するユーザーのみに閲覧編集等の権限を与える。
+
http://kira0332.007webs.com/recipes-healthy-snacks.html healthy diet recipe
=== 1,新しいグループを作成する ===
+
http://kira0332.007webs.com/pictures-of-african-american-hair-styles.html pictures of blackhairstyles
LocalSettings.phpに$wgGroupPermissionsを追記する。<br />
+
http://kira0332.007webs.com/pie-recipe-zaar.html pie recipes with bisquick
+
http://kira0332.007webs.com/free-online-christian-dating.html free online dating uk
<pre>
+
http://kira0332.007webs.com/good-pizza-dough-recipe.html goumet pizza recipes
$wgGroupPermissions['groupname']['move']            = true;
+
http://kira0332.007webs.com/of-meduim-hairstyles.html online hair stylest
$wgGroupPermissions['groupname']['read']            = true;
+
http://kira0332.007webs.com/hitachi-body-massager-for-sale.html cheap hitachi body massager
$wgGroupPermissions['groupname']['edit']            = true;
+
http://kira0332.007webs.com/comedogenic-hair-care.html devacare hair products
$wgGroupPermissions['groupname']['createpage']      = true;
+
http://kira0332.007webs.com/vegetable-soup-recipe-in.html vegetable stew recipes
$wgGroupPermissions['groupname']['createtalk']      = true;
+
http://kira0332.007webs.com/worrgames-autococker-black-magic-05-paintball-gun.html worrgames autococker trilogy sf competition paintball gun
$wgGroupPermissions['groupname']['upload']          = true;
+
http://kira0332.007webs.com/riahnna-hair-style.html rihanna hairstyle in take a bow
$wgGroupPermissions['groupname']['reupload']        = true;
+
http://kira0332.007webs.com/hair-removal-depilator.html hair removal ingrown
$wgGroupPermissions['groupname']['reupload-shared'] = true;
+
http://kira0332.007webs.com/free-tickets-to-sesame-place.html free tickets to drayton manor park
$wgGroupPermissions['groupname']['minoredit']      = true;
+
http://kira0332.007webs.com/recipe-of-beef-stroganoff.html recipes for beef chuck
</pre>
+
http://kira0332.007webs.com/freshwater-aquarium-water-quality.html influent water quality
特別ページのユーザー権限の管理に反映されたgroupnameを、登録ユーザーに割り当てる。。
+
http://kira0332.007webs.com/latest-trends-in-hair-cuts.html layered haircuts 2008
 
+
http://kira0332.007webs.com/beef-siomai-recipe.html beef stew recipe for a
=== 2,新しい名前空間を作成する ===
+
http://kira0332.007webs.com/mexican-style-chicken-recipes.html mint chicken recipe
LocalSettings.phpに$wgExtraNamespaces,$wgNamespacesWithSubpages, and $wgNamespacesToBeSearchedDefaultを追記する。<br />
+
http://kira0332.007webs.com/cashier-jobs-london.html fitter jobs london
+
http://kira0332.007webs.com/oral-health-care-plan.html blue cross and blue shield health plans
$wgExtraNamespaces =
+
http://kira0332.007webs.com/read-book-of-mormon-online.html north carolina online phone book
      array(100 => "Hilfe",         #スペースは使えない
+
http://kira0332.007webs.com/black-stars-hair-styles.html black wedding hairstyle
            101 => "Hilfe_Diskussion",
+
http://kira0332.007webs.com/jamie-oliver-steak-recipe.html mightfish steak recipe
            102 => "Aide",
+
http://kira0332.007webs.com/recipes-for-chicken-stuffed-with.html recipes for chicken tikka
            103 => "Discussion_Aide"
+
http://kira0332.007webs.com/laser-hair-removal-fda.html laser hair removal london
            );
+
http://kira0332.007webs.com/pureit-water-filter.html puresource2 replacement water filter
 
+
http://kira0332.007webs.com/bus-travel-tickets.html travel round the world tickets
<var>$wgNamespacesWithSubpages</var><br />
+
http://kira0332.007webs.com/university-of-illinois-career-center.html contact center careers
MediaWiki 1.4.x and olderの例:
+
http://kira0332.007webs.com/travel-insurance-for-under-18s.html travel insurance including winter sports
$wgNamespacesWithSubpages =
+
http://kira0332.007webs.com/blacken-fish-recipe.html blacken fish recipe
        array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1,
+
http://kira0332.007webs.com/vintage-hairstyle-photos.html virtual hair stylest
              4 => 0, 5 => 1, 6 => 0, 7 => 1,
+
http://kira0332.007webs.com/wild-mountain-water-park-mn.html wilderness resort and water park
              8 => 0, 9 => 1, 10 => 0,11 => 1,
+
http://kira0332.007webs.com/all-recipes-beef.html fried beef recipes
              '''100 => 1, 101 => 1''' );
+
http://kira0332.007webs.com/vanilla-cupcakes-recipes.html lemon cake filling recipe
MediaWiki 1.5.xの例:
+
http://kira0332.007webs.com/sport-chek-tickets.html buy tickets for sports
$wgNamespacesWithSubpages = array(
+
http://kira0332.007webs.com/baked-vegetables-recipes.html baked wonton recipe
NS_TALK          => true,
+
http://kira0332.007webs.com/carrot-and-orange-soup-recipes.html celariac soup recipe
  NS_USER          => true,
+
http://kira0332.007webs.com/foot-massage-happy-valley.html how to give yourself a foot massage
  NS_USER_TALK      => true,
+
http://kira0332.007webs.com/short-prom-hair-cuts.html short stacked hair cuts
  NS_PROJECT_TALK  => true,
+
http://kira0332.007webs.com/management-books-bestsellers.html australian best selling books
  NS_IMAGE_TALK    => true,
+
http://kira0332.007webs.com/cute-haircuts-for-teens.html cute hairstyles at
  NS_MEDIAWIKI_TALK => true,
+
http://kira0332.007webs.com/new-kids-on-the-block-tickets-los-angeles.html goldstar tickets los angeles
  NS_TEMPLATE_TALK  => true,
+
http://kira0332.007webs.com/srilankan-daily-news.html daily hollywood news
  NS_HELP_TALK      => true,
+
http://kira0332.007webs.com/lemon-meringue-pie-recipe-uk.html lemon pie filling recipes
  NS_CATEGORY_TALK  => true,
+
http://kira0332.007webs.com/baked-tofu-recipe.html baked sweet potato recipes
  '''100              => true,'''
+
http://kira0332.007webs.com/pocono-rental-homes.html 4 homes rental
  '''101              => true'''
+
http://kira0332.007webs.com/airline-tickets-to-dubai.html cheap airline tickets to italy
);
+
http://kira0332.007webs.com/london-plays-tickets.html forum london tickets
 
+
http://kira0332.007webs.com/cheap-air-flights-low-cost-airline-tickets.html southwestern airlines tickets
<var>$wgNamespacesToBeSearchedDefault</var><br />
+
http://kira0332.007webs.com/salsa-salad-dressing-recipe.html seeweed salad recipe
MediaWiki 1.4.x and olderの例:
+
http://kira0332.007webs.com/vegetarian-potato-leek-soup-recipe.html vegetarian potluck recipes
$wgNamespacesToBeSearchedDefault =
+
http://kira0332.007webs.com/coastal-management-newspaper-article.html newspaper articles italicized
        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
+
  
 
== 特別ページの画像リスト等にパーミッションを設定する ==
 
== 特別ページの画像リスト等にパーミッションを設定する ==

2008年12月27日 (土) 00:46時点における版

comment1 http://kira0332.007webs.com/recipes-healthy-snacks.html healthy diet recipe http://kira0332.007webs.com/pictures-of-african-american-hair-styles.html pictures of blackhairstyles http://kira0332.007webs.com/pie-recipe-zaar.html pie recipes with bisquick http://kira0332.007webs.com/free-online-christian-dating.html free online dating uk http://kira0332.007webs.com/good-pizza-dough-recipe.html goumet pizza recipes http://kira0332.007webs.com/of-meduim-hairstyles.html online hair stylest http://kira0332.007webs.com/hitachi-body-massager-for-sale.html cheap hitachi body massager http://kira0332.007webs.com/comedogenic-hair-care.html devacare hair products http://kira0332.007webs.com/vegetable-soup-recipe-in.html vegetable stew recipes http://kira0332.007webs.com/worrgames-autococker-black-magic-05-paintball-gun.html worrgames autococker trilogy sf competition paintball gun http://kira0332.007webs.com/riahnna-hair-style.html rihanna hairstyle in take a bow http://kira0332.007webs.com/hair-removal-depilator.html hair removal ingrown http://kira0332.007webs.com/free-tickets-to-sesame-place.html free tickets to drayton manor park http://kira0332.007webs.com/recipe-of-beef-stroganoff.html recipes for beef chuck http://kira0332.007webs.com/freshwater-aquarium-water-quality.html influent water quality http://kira0332.007webs.com/latest-trends-in-hair-cuts.html layered haircuts 2008 http://kira0332.007webs.com/beef-siomai-recipe.html beef stew recipe for a http://kira0332.007webs.com/mexican-style-chicken-recipes.html mint chicken recipe http://kira0332.007webs.com/cashier-jobs-london.html fitter jobs london http://kira0332.007webs.com/oral-health-care-plan.html blue cross and blue shield health plans http://kira0332.007webs.com/read-book-of-mormon-online.html north carolina online phone book http://kira0332.007webs.com/black-stars-hair-styles.html black wedding hairstyle http://kira0332.007webs.com/jamie-oliver-steak-recipe.html mightfish steak recipe http://kira0332.007webs.com/recipes-for-chicken-stuffed-with.html recipes for chicken tikka http://kira0332.007webs.com/laser-hair-removal-fda.html laser hair removal london http://kira0332.007webs.com/pureit-water-filter.html puresource2 replacement water filter http://kira0332.007webs.com/bus-travel-tickets.html travel round the world tickets http://kira0332.007webs.com/university-of-illinois-career-center.html contact center careers http://kira0332.007webs.com/travel-insurance-for-under-18s.html travel insurance including winter sports http://kira0332.007webs.com/blacken-fish-recipe.html blacken fish recipe http://kira0332.007webs.com/vintage-hairstyle-photos.html virtual hair stylest http://kira0332.007webs.com/wild-mountain-water-park-mn.html wilderness resort and water park http://kira0332.007webs.com/all-recipes-beef.html fried beef recipes http://kira0332.007webs.com/vanilla-cupcakes-recipes.html lemon cake filling recipe http://kira0332.007webs.com/sport-chek-tickets.html buy tickets for sports http://kira0332.007webs.com/baked-vegetables-recipes.html baked wonton recipe http://kira0332.007webs.com/carrot-and-orange-soup-recipes.html celariac soup recipe http://kira0332.007webs.com/foot-massage-happy-valley.html how to give yourself a foot massage http://kira0332.007webs.com/short-prom-hair-cuts.html short stacked hair cuts http://kira0332.007webs.com/management-books-bestsellers.html australian best selling books http://kira0332.007webs.com/cute-haircuts-for-teens.html cute hairstyles at http://kira0332.007webs.com/new-kids-on-the-block-tickets-los-angeles.html goldstar tickets los angeles http://kira0332.007webs.com/srilankan-daily-news.html daily hollywood news http://kira0332.007webs.com/lemon-meringue-pie-recipe-uk.html lemon pie filling recipes http://kira0332.007webs.com/baked-tofu-recipe.html baked sweet potato recipes http://kira0332.007webs.com/pocono-rental-homes.html 4 homes rental http://kira0332.007webs.com/airline-tickets-to-dubai.html cheap airline tickets to italy http://kira0332.007webs.com/london-plays-tickets.html forum london tickets http://kira0332.007webs.com/cheap-air-flights-low-cost-airline-tickets.html southwestern airlines tickets http://kira0332.007webs.com/salsa-salad-dressing-recipe.html seeweed salad recipe http://kira0332.007webs.com/vegetarian-potato-leek-soup-recipe.html vegetarian potluck recipes http://kira0332.007webs.com/coastal-management-newspaper-article.html newspaper articles italicized

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

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

LocalSettings.phpに追記する。