mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-06 15:42:39 +00:00
cd14f9ebcb
* split up select.md * array-join.md basic refactoring * distinct.md basic refactoring * format.md basic refactoring * from.md basic refactoring * group-by.md basic refactoring * having.md basic refactoring * additional index.md refactoring * into-outfile.md basic refactoring * join.md basic refactoring * limit.md basic refactoring * limit-by.md basic refactoring * order-by.md basic refactoring * prewhere.md basic refactoring * adjust operators/index.md links * adjust sample.md links * adjust more links * adjust operatots links * fix some links * adjust aggregate function article titles * basic refactor of remaining select clauses * absolute paths in make_links.sh * run make_links.sh * remove old select.md locations * translate docs/es * translate docs/fr * translate docs/fa * remove old operators.md location * change operators.md links * adjust links in docs/es * adjust links in docs/es * minor texts adjustments * wip * update machine translations to use new links * fix changelog * es build fixes * get rid of some select.md links * temporary adjust ru links * temporary adjust more ru links * improve curly brace handling * adjust ru as well * fa build fix * ru link fixes * zh link fixes * temporary disable part of anchor checks
51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
---
|
|
machine_translated: true
|
|
machine_translated_rev: 72537a2d527c63c07aa5d2361a8829f3895cf2bd
|
|
toc_priority: 40
|
|
toc_title: REVOKE
|
|
---
|
|
|
|
# REVOKE {#revoke}
|
|
|
|
Revoca privilegios de usuarios o roles.
|
|
|
|
## Sintaxis {#revoke-syntax}
|
|
|
|
**Revocación de privilegios de usuarios**
|
|
|
|
``` sql
|
|
REVOKE [ON CLUSTER cluster_name] privilege[(column_name [,...])] [,...] ON {db.table|db.*|*.*|table|*} FROM {user | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user | CURRENT_USER} [,...]
|
|
```
|
|
|
|
**Revocación de roles de usuarios**
|
|
|
|
``` sql
|
|
REVOKE [ON CLUSTER cluster_name] [ADMIN OPTION FOR] role [,...] FROM {user | role | CURRENT_USER} [,...] | ALL | ALL EXCEPT {user_name | role_name | CURRENT_USER} [,...]
|
|
```
|
|
|
|
## Descripci {#revoke-description}
|
|
|
|
Para revocar algún privilegio, puede usar un privilegio de alcance más amplio que planea revocar. Por ejemplo, si un usuario tiene `SELECT (x,y)` privilegio, administrador puede realizar `REVOKE SELECT(x,y) ...`, o `REVOKE SELECT * ...` o incluso `REVOKE ALL PRIVILEGES ...` consulta para revocar este privilegio.
|
|
|
|
### Revocaciones parciales {#partial-revokes-dscr}
|
|
|
|
Puede revocar una parte de un privilegio. Por ejemplo, si un usuario tiene `SELECT *.*` privilegio puede revocarle un privilegio para leer datos de alguna tabla o una base de datos.
|
|
|
|
## Ejemplos {#revoke-example}
|
|
|
|
Otorgue el `john` cuenta de usuario con un privilegio para seleccionar de todas las bases de datos `accounts` una:
|
|
|
|
``` sql
|
|
GRANT SELECT ON *.* TO john;
|
|
REVOKE SELECT ON accounts.* FROM john;
|
|
```
|
|
|
|
Otorgue el `mira` cuenta de usuario con un privilegio para seleccionar entre todas las columnas `accounts.staff` excepción de la tabla `wage` una.
|
|
|
|
``` sql
|
|
GRANT SELECT ON accounts.staff TO mira;
|
|
REVOKE SELECT(wage) ON accounts.staff FROM mira;
|
|
```
|
|
|
|
{## [Artículo Original](https://clickhouse.tech/docs/en/operations/settings/settings/) ##}
|