Changed
- lock creating superuser at startup by @dshoreman
- auto validate cookie
- API: return cookie validation state for browser extension
- Finetuning CSS mobile layout
* Avoid creating superuser if variables are removed
Enables the removal of `TA_USERNAME` and/or `TA_PASSWORD` as a way of
preventing an additional superuser being created when another exists.
In the old code, `ELASTIC_USER` would never error due to the default, so
this replaces the loop with one requirement on `ELASTIC_PASSWORD`.
* Use .superuser_created to prevent re-creation
Creates an empty `.superuser_created` file after successful creation,
and uses this to skip the command on future runs. If the file doesn't
exist, then `TA_USERNAME` and `TA_PASSWORD` will also be required.
* The superuser password can't be empty
...well—it *can*—but the password input of the login form requires a
value so even though the account is created, you can't actually login.
* Parse createsuperuser output for 'exists' error
If a user already exists with the same name as the superuser being
created, the command fails with "Error: That name is already taken".
It's probably safe to assume that user is the one we expect. This parses
the output, treating it as successful so it can be skipped next time.
If it hits the catch-all, something probably failed so we exit.
* Use the cache for persistence
Updates the .superuser_created file to be placed in /cache so that it
gets persisted in a volume between config tweaks and container rebuilds.
Also makes `TA_PASSWORD` required always, because it seems to be needed
by tubearchivist/config/settings.py to generate a secret key.
* Let it work outside Docker
If /cache doesn't exist (i.e. when it's not running in Docker), this
falls back to a `cache` dir in the current working directory instead.
Also renames the file to 'initsu.lock' rather than having it hidden.
* Use flexible fallback path for `celery` command
* Initial commit for GET response for TaskAPIView.
* Update for missing space - linting issue.
* Additional linting fixes.
* add is_locked method to check if lock is set
* Update to use `.is_locked` method and add decorator.
* Fix linting issue.
* Fix doubled "rescan" call for locked file.
Removed call to ".owned()" under "is_locked".
* Commenting out GET call in TaskAPI view to revert change for testing.
* Commenting is_locked function to see if Server Response 500 is stopped.
* Reassert is_locked function within RedisArchivist class.
* Create test GET responder.
* Reverting simple GET response change.
* Reapplying simple GET response for `/api/task/`.
* Reapplying change with modification to lock key.
* Documentation update for new GET calls.
* README: fix returned value as `bool` instead of `str`.
* Updating the `is_locked` key reference to "rescan" and "downloading" to fix which key is being retrieved.
* Use dictionary keys, rather than line-by-line statements.
* Fix typo in README for Task View.
Co-authored-by: simon <simobilleter@gmail.com>
Changed:
- Better styled grid row, hid controlls if not applicable
- Changed subtitle naming convention
- Timeout for search as you type
- move delete queue button to settings page