Skip to content

Conversation

@lunny
Copy link
Member

@lunny lunny commented Jan 15, 2026

No description provided.

…able the menu item if user have no permission
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 15, 2026
@lunny lunny added topic/ui Change the appearance of the Gitea UI and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 15, 2026
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Jan 15, 2026
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 15, 2026
{{if and (.Repository.CanContentChange) (not $isTreePathRoot)}}
<div class="divider"></div>
<a class="item tw-text-danger" href="{{.RepoLink}}/_delete/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
<a class="item tw-text-danger{{if not (.Permission.CanWrite ctx.Consts.RepoUnitTypeCode)}} disabled{{end}}" href="{{.RepoLink}}/_delete/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's right. Readers can do "fork and edit"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/templates This PR modifies the template files topic/ui Change the appearance of the Gitea UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants