summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-06-16 05:29:26 -0400
committerGitHub <noreply@github.com>2023-06-16 09:29:26 +0000
commite5422db5c76411780fb218f058ad1a689c876f7a (patch)
tree7b1debb182ac735dfdce0e958bcff6ba5c40fd02 /routers
parent3a29f6aaff6f7d0ae8530c5a9db643f71bd67e25 (diff)
downloadgitea-e5422db5c76411780fb218f058ad1a689c876f7a.tar.gz
gitea-e5422db5c76411780fb218f058ad1a689c876f7a.zip
Show if File is Executable (#25287) (#25300)
Backport #25287 by @JakobDev This simply shows if a File has the executable Permission ![grafik](https://github.com/go-gitea/gitea/assets/15185051/1d50c105-6d55-4ecc-808a-c9cd5559d238) Co-authored-by: JakobDev <jakobdev@gmx.de> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/view.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 2fd893f91c..59d15583eb 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -382,6 +382,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["IsRepresentableAsText"] = isRepresentableAsText
ctx.Data["IsDisplayingSource"] = isDisplayingSource
ctx.Data["IsDisplayingRendered"] = isDisplayingRendered
+ ctx.Data["IsExecutable"] = entry.IsExecutable()
isTextSource := fInfo.isTextFile || isDisplayingSource
ctx.Data["IsTextSource"] = isTextSource