Closed soedirgo closed 1 year ago
Add /table-privileges endpoint to list table (& views, matviews, etc.) privileges.
/table-privileges
Example output:
Request:
GET /table-privileges
Response:
[ { "relation_id": 12345, "schema": "public" "name": "users_audit", "kind": "table", "privileges": [ { "grantee": "postgres", "grantor": "postgres", "is_grantable": false, "privilege_type": "INSERT", }, { "grantee": "postgres", "grantor": "postgres", "is_grantable": false, "privilege_type": "SELECT", }, ... ], }, ... ]
POST /table-privileges [ { "relation_id": 11111, "grantee": "postgres", "privilege_type": "ALL" }, { "relation_id": 22222, "grantee": "postgres", "privilege_type": "ALL" } ]
[ { "relation_id": 11111, "schema": "public" "name": "t1", "kind": "table", "privileges": [...] }, { "relation_id": 22222, "schema": "public", "name": "t2", "kind": "table", "privileges": [...] } ]
DELETE /table-privileges [ { "relation_id": 11111, "grantee": "postgres", "privilege_type": "ALL" }, { "relation_id": 22222, "grantee": "postgres", "privilege_type": "ALL" } ]
[ { "relation_id": 11111, "schema": "public" "name": "t1", "kind": "table", "privileges": [] }, { "relation_id": 22222, "schema": "public", "name": "t2", "kind": "table", "privileges": [] } ]
TODO:
Add
/table-privileges
endpoint to list table (& views, matviews, etc.) privileges.Example output:
Request:
Response:
Request:
Response:
Request:
Response:
TODO: