18F / autoapi

A basic spreadsheet to api engine
Other
42 stars 18 forks source link

Disable /admin/ endpoint #67

Open toolness opened 8 years ago

toolness commented 8 years ago

As mentioned in https://github.com/18F/autoapi/pull/59#discussion_r68307820, the /admin/ endpoint isn't documented.

Upon further investigation, it appears this endpoint is actually provided by sandman2, and exposes a Flask-Admin blueprint that allows users to view and edit table data.

The endpoint is protected by basic auth, whose username and password are determined by the AUTOAPI_ADMIN_USERNAME and AUTOAPI_ADMIN_PASSWORD environment variables, respectively.

Here's an example dataset in the admin view:

screen shot 2016-06-29 at 10 01 32 am

One question I have is in regards to editing the data. It seems like the database is constantly flushed and re-built from CSV data, so I assume that any edits will be wiped away when the CSVs are re-imported?

toolness commented 8 years ago

Talked to @gbinal last week and it looks like we might actually just want to disable this endpoint entirely, particularly given the potential confusion/loss of data caused by editing via the admin UI and then importing a CSV later.