]> source.dussan.org Git - gitea.git/commitdiff
don't show project cog in issue sidebar if no permission (#14953)
authorNorwin <noerw@users.noreply.github.com>
Fri, 12 Mar 2021 15:14:02 +0000 (15:14 +0000)
committerGitHub <noreply@github.com>
Fri, 12 Mar 2021 15:14:02 +0000 (16:14 +0100)
templates/repo/issue/view_content/sidebar.tmpl

index e068e72d65275b34ac19b032eef5ad5d21b1367f..7b4e522e867f410f3b4d00fb53fcb6cfc4a57cd9 100644 (file)
                        <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
                                <span class="text">
                                        <strong>{{.i18n.Tr "repo.issues.new.projects"}}</strong>
-                                       {{svg "octicon-gear"}}
+                                       {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
+                                               {{svg "octicon-gear"}}
+                                       {{end}}
                                </span>
                                <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects">
                                        <div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_projects"}}</div>