mirror of
https://github.com/go-gitea/gitea
synced 2025-08-02 07:38:35 +00:00
@@ -20,8 +20,8 @@ func ProcessorHelper() *markup.RenderHelperFuncs {
|
||||
return false
|
||||
}
|
||||
|
||||
giteaCtx, ok := ctx.(*gitea_context.Context)
|
||||
if !ok {
|
||||
giteaCtx := gitea_context.GetWebContext(ctx)
|
||||
if giteaCtx == nil {
|
||||
// when using general context, use user's visibility to check
|
||||
return mentionedUser.Visibility.IsPublic()
|
||||
}
|
||||
|
@@ -35,8 +35,8 @@ func renderRepoFileCodePreview(ctx context.Context, opts markup.RenderCodePrevie
|
||||
return "", err
|
||||
}
|
||||
|
||||
webCtx, ok := ctx.Value(gitea_context.WebContextKey).(*gitea_context.Context)
|
||||
if !ok {
|
||||
webCtx := gitea_context.GetWebContext(ctx)
|
||||
if webCtx == nil {
|
||||
return "", fmt.Errorf("context is not a web context")
|
||||
}
|
||||
doer := webCtx.Doer
|
||||
|
Reference in New Issue
Block a user