MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=globaluserrights

(main | globaluserrights)
  • มอดูลนี้ต้องการสิทธิในการอ่าน
  • มอดูลนี้ต้องการสิทธิในการเขียน
  • มอดูลนี้ยอมรับเฉพาะคำขอ POST เท่านั้น
  • แหล่งที่มา: CentralAuth
  • สัญญาอนุญาต: GPL-2.0-or-later

Add/remove a user to/from global groups.

Specific parameters:
Other general parameters are available.
user

Global username.

ชนิด: ผู้ใช้ โดย ชื่อผู้ใช้ และ ไอดีผู้ใช้ (เช่น "#12345")
userid
เลิกใช้แล้ว

Global user ID.

Type: integer
add

Add the user to these global groups.

ค่า (คั่นด้วย | หรือข้อความทดแทน): abusefilter-helper, abusefilter-maintainer, apihighlimits-requestor, captcha-exempt, founder, global-bot, global-deleter, global-flow-create, global-interface-editor, global-ipblock-exempt, global-rollbacker, global-sysop, new-wikis-importer, oathauth-tester, ombuds, recursive-export, staff, steward, sysadmin, vrt-permissions, wmf-email-block-override, wmf-researcher
expiry

Expiry timestamps. May be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). If only one timestamp is set, it will be used for all groups passed to the add parameter. Use infinite, indefinite, infinity, or never for a never-expiring user group.

คั่นค่าต่าง ๆ ด้วย | หรือข้อความทดแทน
Maximum number of values is 50 (500 for clients that are allowed higher limits).
Default: infinite
remove

Remove the user from these global groups.

ค่า (คั่นด้วย | หรือข้อความทดแทน): abusefilter-helper, abusefilter-maintainer, apihighlimits-requestor, captcha-exempt, founder, global-bot, global-deleter, global-flow-create, global-interface-editor, global-ipblock-exempt, global-rollbacker, global-sysop, new-wikis-importer, oathauth-tester, ombuds, recursive-export, staff, steward, sysadmin, vrt-permissions, wmf-email-block-override, wmf-researcher
reason

Reason for the change.

ค่าเริ่มต้น: (ว่าง)
token

A "userrights" token retrieved from action=query&meta=tokens

For compatibility, the token used in the web UI is also accepted.

This parameter is required.
tags

This parameter is currently unused.

ค่า (คั่นด้วย | หรือข้อความทดแทน):
ตัวอย่าง:
Add user FooBot to global group "bot", and remove from global groups "sysop" and "bureaucrat"
api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC [เปิดในกระบะทราย]
Add the global user with ID 123 to global group "bot", and remove from global groups "sysop" and "bureaucrat"
api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC [เปิดในกระบะทราย]