Trợ giúp về API MediaWiki

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)
  • Mô đun này cần quyền đọc.
  • Mô đun này cần quyền ghi.
  • Mô đun này chỉ có nhận các yêu cầu POST.
  • Source: CentralAuth
  • License: GPL-2.0-or-later

Add/remove a user to/from global groups.

Các tham số:
Other general parameters are available.
user

Tên thành viên toàn cục.

Kiểu: người dùng, bằng một giá trị bất kỳ trong tên người dùng và số người dùng (ví dụ “#12345”)
userid
Lỗi thời.

Số thành viên toàn cục.

Type: integer
add

Thêm người dùng vào các nhóm toàn cục này.

Các giá trị (phân tách bằng |): steward
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.

Phân tách các giá trị bằng |.
Maximum number of values is 50 (500 for clients that are allowed higher limits).
Default: infinite
remove

Tách người dùng khỏi các nhóm toàn cục này.

Các giá trị (phân tách bằng |): steward
reason

Lý do thay đổi.

Mặc định: (trống)
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.

Các giá trị (phân tách bằng |):
Các ví dụ:
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 [open in sandbox]
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 [open in sandbox]