]> source.dussan.org Git - gitea.git/commit
Hide code links on release page if user cannot read code (#29064)
authorJason Song <i@wolfogre.com>
Tue, 6 Feb 2024 11:57:25 +0000 (19:57 +0800)
committerGitHub <noreply@github.com>
Tue, 6 Feb 2024 11:57:25 +0000 (19:57 +0800)
commitf9072dbf3c558ba5d4365b551d95936a52e4c94d
treeeecd6c01b673d75624410af3fcb71e4ef5f2769b
parentf69914dd0b5607861f36f89c362f4b2cc3f60403
Hide code links on release page if user cannot read code (#29064)

On the release list page, if the user doesn't have the permission to
read code, the code links will lead to 404 pages or api errors:

<img width="1297" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/a74fbc63-6dd6-43c6-853c-28acdbfdcb4e">

After this PR:

<img width="1297" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/a626373d-c2df-40a9-8fed-1b12ff6bc56f">

And this PR also removed some dead code. After #23465, the tag list page
has an independent template, and all `IsTag` in the release list
template are always false.
templates/repo/release/list.tmpl