Hiding parts of pages

Can I hide or protect parts of page (or a modular page) that is accessible for everyone?

Content open for every visitor to read {% if logged_in %}except for this classified string of text here {% end_if %} and we are back to the open stuff again.

In Twig that would work if logged_inwas set to true (and the statement was closed by endif). Are you thinking of protecting content in the Markdown, or in Twig?

You can restrict portions of you templates or even your page content (with process: twig: true in the page header with:

{% if grav.user.authorize('site.secret') %}

[color=red]This is strictly controlled with `access: site.secret`[/color]

{% endif %}

This will allow any user with access: site: secret: true to access it:

    login: 'true'
    super: 'true'
    login: 'true'
    secret: 'true'

Thanks! That solved my problem perfectly.
Not that I need it right now but Gingah made me curious on the markdown approach. How would that be done?

I imagine the solution rhukster specified above could be used as a shortcode by extending the shortcode-plugin, so you could for example do:

[private=super]This content is only visible to admins with super: true.[/private]

Could be! if you want to add that shortcode, I would accept it as a PR for shortcode-core. Great way to learn too!