aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/projects/new.tmpl
diff options
context:
space:
mode:
authorwULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf <61180606+wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf@users.noreply.github.com>2020-08-22 08:58:59 +0200
committerGitHub <noreply@github.com>2020-08-22 02:58:59 -0400
commitd4e35b9dc61779559fe28a7537d28bef2938a443 (patch)
tree833e669f014fc661fec2b1842e268bcda119462f /templates/repo/projects/new.tmpl
parenta0484890c11a088330db0e3a0c03474ee2408b13 (diff)
downloadgitea-d4e35b9dc61779559fe28a7537d28bef2938a443.tar.gz
gitea-d4e35b9dc61779559fe28a7537d28bef2938a443.zip
Hide 'New Project board' button for users that are not signed in (#12547)
* hide: 'New Project board' button * there is no reason to show the button for users that are not signed in * update template: specifies the condition together with another one as per lafriks' suggestion in the comment * chore: add proper user authorization check * chore: also hide button if repo is archived * chore: show project board edit/delete menu to authorized users only * chore: drop the redundant IsSigned check * CanWriteIssues and CanWritePulls implies (and requires) signed in user * Add CanWriteProjects and properly assert permissions Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/projects/new.tmpl')
-rw-r--r--templates/repo/projects/new.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/projects/new.tmpl b/templates/repo/projects/new.tmpl
index 2da722bf9e..aabc09c80d 100644
--- a/templates/repo/projects/new.tmpl
+++ b/templates/repo/projects/new.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="navbar">
{{template "repo/issue/navbar" .}}
- {{if and (or .CanWriteIssues .CanWritePulls) .PageIsEditProject}}
+ {{if and .CanWriteProjects .PageIsEditProject}}
<div class="ui right floated secondary menu">
<a class="ui green button" href="{{$.RepoLink}}/projects/new">{{.i18n.Tr "repo.milestones.new"}}</a>
</div>