API:Restricting API usage/cs

Existuje několik způsobů, jak omezit používání (určitých částí) API na určité skupiny uživatelů nebo je úplně zakázat. Some of these require changing group permissions.

Restricting access to the write API
You can deny certain groups the right to use the write API by denying them the writeapi right. By default, all groups have the writeapi right.

Disabling modules
You can disable individual modules for all users by adding a line to LocalSettings.php. Exactly what to add depends on the type of module you want to disable:


 * For  modules, use
 * For  modules, use
 * For  modules, use
 * For  modules, use

Examples
To disable anyone who isn't a sysop from using :

To limit the access of an API action, add the following hook for :

Replace,   and   with the appropriate values.