Closed boardend closed 1 month ago
Task linked: QF-3734 Add a way to configure secrets via the Admin
@suricactus BadSignature error occurs when you have secrets in the db encrypted with a different key (e.g. a db dump from another system). Try to clean the secrets table and test with newly created secrets.
There is now a read-only ProjectSecretInline:
The only missing part is a button in the project admin to create a new secret for that project. @suricactus do you have an idea how this can be implemented (without a custom project template)?
Otherwise I think this is ready to be merged.
The only missing part is a button in the project admin to create a new secret for that project. @suricactus do you have an idea how this can be implemented (without a custom project template)?
See potential fix to this issue here: https://github.com/opengisch/qfieldcloud/pull/949
Otherwise I think this is ready to be merged.
I did a small commit, check it's commit and message. In general, we always prefer to use the decorator for new admin stuff, the old way looks a bit too hacky.
One thing which you might have considered is to move the validation from
admin.ProjectSecretForm.clean()
to themodels.Secret.clean()
.
Since we are messing with the name in admin.ProjectSecretForm.clean()
too, I will leave everything in one place. But I will keep it in mind, when we e.g. extend the scope of the secrets.
Just re-based on my machine. If the tests pass, I will squash and merge.
Secrets list view:![Screenshot from 2024-04-26 11-04-09](https://github.com/opengisch/qfieldcloud/assets/591241/7ad0c4fa-e5fa-460b-a860-673620a6c7d4)
Adding a new secret:![Screenshot from 2024-04-26 11-05-37](https://github.com/opengisch/qfieldcloud/assets/591241/8f950be7-9438-4b26-88e1-78c2df0e5f1b)
Name
,Type
,Value
andProject
can be specifiedCreated by
will be set to the current userModifying an existing secret:![Screenshot from 2024-04-26 11-05-54](https://github.com/opengisch/qfieldcloud/assets/591241/6a37412b-4d21-4d5f-85a8-3bff5c8b9ac3)
Value
is not presented to the userValue
can be overwrittenType