Skip to content

Commit 2cf80f4

Browse files
JunHsiehappleboy
authored andcommitted
Hide the create organization button (in dashboard/organization section) (#1705)
when the user has no such permission.
1 parent 397474e commit 2cf80f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/user/dashboard/dashboard.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@
7676
<h4 class="ui top attached header">
7777
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
7878
<div class="ui right">
79+
{{if .SignedUser.CanCreateOrganization}}
7980
<a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
8081
<i class="plus icon"></i>
8182
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
8283
</a>
84+
{{end}}
8385
</div>
8486
</h4>
8587
<div class="ui attached table segment">

0 commit comments

Comments
 (0)