mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Return status 200 for unauthorized operation, revert commit: 2fd2d88d20
This commit is contained in:
parent
976b5766a5
commit
0108b58db4
@ -17,7 +17,6 @@ package routers
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -36,7 +35,7 @@ type Response struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func responseError(ctx *context.Context, error string, data ...interface{}) {
|
func responseError(ctx *context.Context, error string, data ...interface{}) {
|
||||||
ctx.ResponseWriter.WriteHeader(http.StatusForbidden)
|
// ctx.ResponseWriter.WriteHeader(http.StatusForbidden)
|
||||||
|
|
||||||
resp := Response{Status: "error", Msg: error}
|
resp := Response{Status: "error", Msg: error}
|
||||||
switch len(data) {
|
switch len(data) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user