Depends on #160, #196, #197.
Closes#147.
This introduces a new type of audit event: the CheckList. This is a list of map checks that the validator performed. The intention is to update the web interface to display ✅ check marks for every check passed and ❌ for every check failed, and also include the summary of why the check failed. ~~The `Details` field would be the complete internal structure of the check in json, but I'm thinking it's unnecessary and should just be omitted.~~ The `Details` field has been removed.
```go
type Check struct {
Name string `json:"name"`
Summary string `json:"summary"`
Passed bool `json:"passed"`
}
type AuditEventDataCheckList struct {
CheckList []Check `json:"check_list"`
}
```
This is created instead of the Error audit event when the validator requests changes, but the Error audit event can still be created for other purposes.
- [x] Make a proper error instead of hijacking a CheckList
Reviewed-on: #181
Reviewed-by: itzaname <itzaname@noreply@itzana.me>
Co-authored-by: Quaternions <krakow20@gmail.com>
Co-committed-by: Quaternions <krakow20@gmail.com>
Closes#43.
This is a very bare bones implementation, but gets us started on https://git.itzana.me/StrafesNET/maps-service/milestone/3
This will break production as written! A proper implementation requires a separate api key since the maptest places are to be hosted on a different group.
Edit: It will actually not break, because it is using cookie access. The staging cookie has permission to edit StrafesNET Maptest asset permissions via StrafesNET_CI3, while prod also has access via StrafesNET_CI2. Both staging and prod versions of the website will add maptest asset access to the same places on StrafesNET Maptest.
Reviewed-on: #198
Co-authored-by: Quaternions <krakow20@gmail.com>
Co-committed-by: Quaternions <krakow20@gmail.com>
Bypassing the submit process means that the map revision is not updated. Change the endpoint and include a flag to skip the map checks but update the revision.
Reviewed-on: #199
Co-authored-by: Quaternions <krakow20@gmail.com>
Co-committed-by: Quaternions <krakow20@gmail.com>
This changes the way that the internal api works. The backend used to implicitly create an error for specifc endpoints, but now the validator explicitly creates the error itself.
Reviewed-on: #197
Co-authored-by: Quaternions <krakow20@gmail.com>
Co-committed-by: Quaternions <krakow20@gmail.com>