Restrict Content To Staff

Hi there,

I am trying to restrict some content (pages) to registered staff members of my blog.

As far as I can tell, it isn’t possible to do this with the visibility settings on the page backend, so I’m looking to create a custom page template to achieve what I’m after


Is anyone able to tell me if it is possible to do an ‘if’ statement to test if the current user is a member of staff?

Something along the lines of {{if @ staff}}

Thanks for any help


There’s nothing in handlebars that’ll do that, I think.

IF your front end and admin pages are on the same domain (not the case for Ghost Pro users), I think you could do a fetch to the Admin API with include credentials to get the post content and put it on the page. (You could also have your staff users do a separate login - see Ghost Admin API Documentation for some options.) So maybe you could have some posts that are not visible anywhere on the front end normally, but you also have a special template on the front end that uses javascript to make a request including the admin cookie (or runs a whole authentication flow), and then renders the page with the content retrieved. Could be done, but not a trivial task.

Another workaround: Make a tier that you put only your staff users in. (Don’t display it in Portal - there’s a checkbox for that.) Restrict those staff user posts to just that tier.

1 Like

Thank you for the detailed reply!

Sadly I don’t have the knowledge to be able to even begin your first ideas (and I’m on ghost pro).

Your membership tier idea might work though - I’ll give it a go :)

Edit: Yep - worked a treat. Thank you

1 Like