mirror of https://github.com/go-gitea/gitea.git
Fix for anonymous users to switch views
This commit is contained in:
parent
fc3ed8a1de
commit
7b75d93f3d
|
@ -23,13 +23,15 @@ func SetEditorconfigIfExists(ctx *context.Context) {
|
|||
}
|
||||
|
||||
func SetDiffViewStyle(ctx *context.Context) {
|
||||
queryStyle := ctx.Query("style")
|
||||
|
||||
if !ctx.IsSigned {
|
||||
ctx.Data["IsSplitStyle"] = queryStyle == "split"
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
userStyle = ctx.User.DiffViewStyle
|
||||
queryStyle = ctx.Query("style")
|
||||
style string
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue