Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
✨ Hid "feature this post" toggle when logged in as an Author or Contr…
Browse files Browse the repository at this point in the history
…ibutor

no issue
- hides the "Featured this post" toggle in the post settings menu when the currently logged in user is an Author or Contributor
- https://forum.ghost.org/t/remove-the-permission-to-set-posts-to-featured/7441/5?u=kevin
  • Loading branch information
kevinansfield committed May 28, 2019
1 parent 48df541 commit 3697d15
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app/templates/components/gh-post-settings-menu.hbs
Expand Up @@ -126,6 +126,7 @@
</li>
</ul>

{{#unless this.session.user.isAuthorOrContributor}}
<div class="form-group for-checkbox">
<label class="checkbox" for="featured" {{action "toggleFeatured" bubbles="false"}}>
<input
Expand All @@ -139,6 +140,7 @@
<p>Feature this {{post.displayName}}</p>
</label>
</div>
{{/unless}}

{{gh-psm-template-select
post=post
Expand Down Expand Up @@ -409,10 +411,12 @@
pane is shown
--}}
{{#if _showThrobbers}}
{{gh-tour-item "featured-post"
target="label[for='featured'] p"
throbberAttachment="middle middle"
throbberOffset="0px -20px"
popoverTriangleClass="bottom-right"
}}
{{#unless this.session.user.isAuthorOrContributor}}
{{gh-tour-item "featured-post"
target="label[for='featured'] p"
throbberAttachment="middle middle"
throbberOffset="0px -20px"
popoverTriangleClass="bottom-right"
}}
{{/unless}}
{{/if}}

0 comments on commit 3697d15

Please sign in to comment.