Jump to content

Help:User rights/ja

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Ribbon (talk | contribs) at 11:48, 3 May 2007 (その他の構成オプション). It may differ significantly from the current version.
MediaWiki ハンドブック: 目次読者編集者中間管理者システム管理者 +/-
Help:User rightsも参照

このページはMediaWiki内のユーザ権限について説明している。それに添って、phpファイルの編集権限と、データベースの直接アクセスの権限がある。

利用者に対する権利の許可

特定の利用者名'管理者'モードに許可するための、(Special:Userrightsという)単純なインタフェースがある - 'Bureaucrat'モードの利用者は、このフォーム中に利用者名を入力することで、その利用者に'管理者'を許可することができる。古いバージョンのMediaWiki(1.5以前)は利用者アカウントのuser rightsをセットするための、一般的なインタフェースフィールドがない(その代りに、Special:Makesysopを使う)。

'管理者'以外のアカウントモードを割り当てる(removing、'管理者'モードを含む)ことは、データベース中でSQLクエリを実行することで手動で行なえる。通常以下のように行なう(もしも1.4以上を使っているならば、以下を見る):

> mysql -u root -p

mysql> use wikidb;

mysql> UPDATE user SET user_rights='bureaucrat,sysop' WHERE user_name='The Username';

上記のテキストの中の"user"はwikidbデータベース中のuser テーブルである。

user_rightフィールドはカンマで分割されたリストである;ソフトウェアによって認識される、4つの値が現在ある:

Username は管理者権限を与えたい人である。

注意 権限情報が確実に更新されたかのために、一旦ログアウトしてログインし直す必要がある。

Template:MW 1.4 If you are using 1.4: The user_rights field has been removed and the user rights are now located in their own table. The new table is user_rights. It contains two fields; ur_user and ur_rights. This sql query should do the trick.

UPDATE user_rights SET ur_rights="bureaucrat,sysop" WHERE ur_user=1;

You may need to replace the number 1 with the appropriate user id. The user will need to log out and log back in before that user's rights will be in effect.

Template:MW 1.5 もしも1.5を使っている場合: 利用者権限はuser_groupsと言う、ug_user と ug_groupという2つのフィールドを持つ新しいテーブル中にある。"user"テーブルから利用者のid番号を知る必要がある。このsql区えりはトリックを使うべきである。以下の例中で、user テーブルからの利用者のID番号を1の所に置き換える。

INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'bureaucrat'); 
INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'sysop');

phpMyAdminの使用

もしもmySQLに対して直接アクセスできないなら、phpMyAdmin経由で利用者の権限を更新できる。最初にphpMyAdminを開き、左側のフレームから、ドロップダウンボックスから、wikiのデータベースを選ぶ。右のフレーム中で、DB中の全てのテーブルのリストがロードされる。そのページの右のフレームの一番上で、"SQL"タブをクリックする。テキストボックスが開く。そのボックス中に実行したいクエリを入力する。

例をあげると、もしも、1.4中で利用者にBureaucratと管理者権限を与えたいと試みるならば、以下を入力する:

UPDATE user_rights SET ur_rights="bureaucrat,sysop" WHERE ur_user=1;

... 置き換えは、もちろん、ur_user=1" 中の"1"は利用者IDである。("user"で左フレーム中のリンクをクリックすることで、これを探すことが出来る。次に、"Browse"タブをクリックし、利用者名を探す。IDは左に現れる。)

次に"GO"ボタンを押す。もしも、"エラー"メッセージが出なければ、正しく動作した。

新しいバージョンでは、以下を入力する(上記参照)

INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'bureaucrat'); 
INSERT INTO user_groups (ug_user, ug_group) VALUES ('1', 'sysop');

憶えておかなければならない重要点は、以下のようなことを使わないことである:

> mysql -u root -p

mysql> use wikidb; 

phpMyAdmin中で。

利用者権限のレベル

訳注: ja:Wikipedia:管理者に大半が書いてあるのでここでは訳を省略。

管理者

This is the most common privileged user. A user marked as 'sysop' can delete and undelete pages, protect and unprotect pages, block and unblock IPs, issue read-only SQL queries to the database, and use a shortcut revert-to-previous-contributor's-revision feature in contribs. See Help:Administration for details. (Due to something of a historical accident, users with sysop status are generally referred to as 'administrators' or 'admins' on the English Wikipedia, and most likely elsewhere.)

開発者

This is largely obsolete and will be removed from future versions of the software.

Developer has special rights and sees additional features in the Special-Pages (lock / unlock DB) as well in setting User-rights. Only a developer can UN-Set (delete) the Sysop-Rights of an admin.

ビューロクラット

This is a user that is allowed to turn other users into sysops via the aforementioned Special:Userrights page.

bot

A registered bot account. Edits by an account with this set will not appear by default in Recent changes; this is intended for mass imports of data without flooding human edits from view. (To show bot edits, either click the "Show bots" link on the Special:Recentchanges page, or append &hidebots=0 directly to the page URL, e.g. like this on Wikipedia, or like this on Meta-Wiki.)

See the category Wikipedia:Category:Wikipedia vandalism on main Wikipedia.

利用者権限の無効化

注意! 現在のバージョンのuser_rights is goneテーブルは、user_groupsテーブルが代りに使われている ! maintenance/tables.sqlを参照。


現在の開発ステージ中で、MediaWikiは利用者の作成、管理者とビュー六ラットの設定をするためのwebベースのインタフェースがあるが、権限を外すインタフェースはない。

現在、ユーザ権限をダウングレードするための唯一の方法は以下のSQLを通して行なう:

UPDATE user SET user_rights='' WHERE user_name='yourusername';

Version 1.4 Mediawiki:

UPDATE user_rights SET ur_rights="" WHERE ur_user=1;

or using Program phpMyAdmin read a textfile into the "TINYBLOB" ur_rights or table user_rights that contains the proper user-entries "sysop,bureaucrat,developer"

--HeliR 12:01, 4 Jan 2005 (UTC)

wikiに対するアクセス制限の設定

Preventing Accessも参照。


MediaWikiバージョン1.4以前では、 LocalSettings.php中に以下のようなコマンドのいくつかか全部を置くことによって利用者の制限をカスタマイズできる;その後に続く分の*下に*正しく配置する:

 # this must be above all of your custom changes!
 require_once( "includes/DefaultSettings.php" );
# Specify who can edit: true means only logged in users may edit pages
$wgWhitelistEdit = true;

# Pages anonymous (not-logged-in) users may see
$wgWhitelistRead = array ("Main Page", "Special:Userlogin", "Wikipedia:Help");

# Specify who may create new accounts: 0 means no, 1 means yes
$wgWhitelistAccount = array ( 'user' => 0, 'sysop' => 1, 'developer' => 1 );

訳注:ここは1.4以前の話なので訳を省略。

If new account creation is limited to sysops only, it must be performed by first logging in as a sysop user, and then visiting the Special:Userlogin page. You may manually enter the address http://<YOUR_WIKI_SERVER_ROOT_HERE>/index.php/Special:Userlogin into the address bar, or by clicking Special pages link in the toolbox menu, then click Create an account or log in (the first item available). Warning: Mediawikis in other languages must change the whitelist pagenames. e.g. German: "Spezial:Userlogin" instead of "Special:Userlogin".

If you set $wgWhitelistEdit = true in LocalSettings.php, you may also want to set

$wgShowIPinHeader = false; # For non-logged in users

This removes the link to the talk page in the header for non-logged in users. You may also want to change the contents of your wiki's MediaWiki:Userlogin page from Create an account or log in to Log in.

バージョン1.5以降ではアクセス権の設定の操作のHelp:User rightsページを参照のこと。

その他の構成オプション

これは、選択されたグループのみによって実行すべきである編集(または読み出しアクセス)の場合のために便利かもしれない。MediaWikiは大きなスケールと同じように小さな場合も、グループコラボレーションツールとして便利に使える。

whitelistを作成するとき、スタイルシートページを追加することを忘れないこと、例をあげると、

"MediaWiki:Monobook.css" と "MediaWiki:Monobook.js"である。また、既定値のスタイルのために、add "-" も追加する。
$wgSysopUserBans    = false;      # 管理者がログインした利用者をブロックできる。
$wgSysopRangeBans   = false;      # 管理者がIPレンジをブロックできる。