Enable token authentication to 'list_database_tables' endpoint
What is in this MR
This MR allows listing a database's tables using a database token (related to issue #1100).
Only tables that the token has access to are returned in the response.
POST
access in the view (i.e. the create table endpoint) was also modified to ensure that no token has permission to access it.
How to test this MR
For any database and database token:
curl -vvv -X GET -H "Authorization: Token $TOKEN" "http://localhost:8000/api/database/tables/database/<database-id>/" | jq
Merge Request Checklist
-
changelog.md has been updated if required. -
Documentation has been updated -
Quality Standards are met -
Performance: tables are still fast with 100k+ rows, 100+ field tables -
The redoc API pages have been updated for any REST API changes -
Our custom API docs are updated for changes to endpoints accessed via api tokens -
The UI/UX has been updated following UI Style Guide
Edited by Adam Kariv