• Resolved L O Lawson

    (@l-o-lawson)


    I have hierarchical user roles. In most places on my site hierarchical permissions is perfect, but in a few places on my site I’d like to exclude higher level roles from viewing sections of content on pages–content that is available to lower levels.

    For example, if I have the hierarchical roles
    Highest Role
    Middle Role
    Lowest Role

    Is there short code option that would explicitly allow the lowest and highest role, but exclude the middle?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Unfortunately that is not currently possible with the shortcode, but it is a good idea. Can I ask you some more about your use case, so I can figure out the best way to implement this feature?

    Thread Starter L O Lawson

    (@l-o-lawson)

    I have a page that I want to be viewed by hierarchical Levels 1-5. However, there is a section of the page that I don’t want to be visible to Level 3. I’d like to be able to use the shortcode on that section to block level 3, perhaps like

     Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
    
    [restrict role="-level3"] Suspendisse id dui malesuada felis imperdiet mollis sit amet vitae eros.  [/restrict]
    
    Praesent lobortis tellus non lacus congue laoreet.
    • This reply was modified 9 years, 4 months ago by L O Lawson.
    Plugin Author Joachim Jensen

    (@intoxstudio)

    That makes sense. Just to be clear, when you say hierarchical levels, do you refer to the Access Levels created by the plugin, or the Roles that is part of WordPress (and that you can synchronize to a level)?

    Thread Starter L O Lawson

    (@l-o-lawson)

    Either, but I actually intended to ask about Access Levels.

    Plugin Author Joachim Jensen

    (@intoxstudio)

    I have noted this feature on the roadmap, so it will be included in the plugin, but unfortunately I cannot give an ETA.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Exclude Role in Shortcode?’ is closed to new replies.