mirror of
https://github.com/1f349/site-hosting.git
synced 2025-01-20 22:26:37 +00:00
API: Prevent setEnabled when domain is not owned
This commit is contained in:
parent
303e789d82
commit
6f285c8208
@ -34,6 +34,7 @@ func setEnabled(rw http.ResponseWriter, req *http.Request, params httprouter.Par
|
||||
|
||||
if !validateDomainOwnershipClaims(host, b.Claims.Perms) {
|
||||
http.Error(rw, "Forbidden", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
|
||||
err := db.SetDomainBranchEnabled(req.Context(), database.SetDomainBranchEnabledParams{
|
||||
|
Loading…
Reference in New Issue
Block a user