mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 11:18:30 -04:00
code fix #941 caution: undertest
This commit is contained in:
parent
b99c4baab2
commit
6d0f3a07d4
10 changed files with 310 additions and 260 deletions
|
@ -288,7 +288,7 @@ func serviceRpc(rpc string, hr handler) {
|
|||
|
||||
access := hasAccess(r, hr.Config, dir, rpc, true)
|
||||
if access == false {
|
||||
renderACCESS_MODE_NONE(w)
|
||||
renderNoAccess(w)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ func renderNotFound(w http.ResponseWriter) {
|
|||
w.Write([]byte("Not Found"))
|
||||
}
|
||||
|
||||
func renderACCESS_MODE_NONE(w http.ResponseWriter) {
|
||||
func renderNoAccess(w http.ResponseWriter) {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
w.Write([]byte("Forbidden"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue