Restrict Custom block at home page based on user group

8 Comments

  • Jennifer Rowe
    Comment actions Permalink

    Thanks, Diziana! You know we always love your tips!

    1
  • Joe Palmieri
    Comment actions Permalink

    Hi there,

    When 'lurking' around in the source code, I found this message, right above the declaration of the HelpCenter.user object:

    We also use this object's values to restrict content based on users (e.g., only show feature x to authenticated users).

    Is this note still accurate? In other words, should we be worried about the HelpCenter.user object being removed in the future (and thus breaking our current Help Center's functionality)?

    The above code is from an inline script included in the html of https://[brand].zendesk.com/hc/en-us

    0
  • Jessie Schutz
    Comment actions Permalink

    Hi Joe!

    The note is accurate. It doesn't necessarily mean that anything is going to change, but we can't promise that changes won't happen as Zendesk continues to grow and evolve. We don't want your stuff to break in the event that happens because we won't be able to help you fix your customizations, which is why we put the note there.

    Please let me know if you have other questions, or need any further clarification!

    0
  • Joe Palmieri
    Comment actions Permalink

    Thanks, Jessie! Totally makes sense. We'll use this cautiously and won't blame you if it ever changes :)

    0
  • Tobias Eriksson
    Comment actions Permalink

    Thank you! Been looking for a way to do this a couple of days now!!! Cheers!

    I changed the JS from <li> to <p> and it looks like it works as well! 

    0
  • Diziana
    Comment actions Permalink

    @Joe: It's good idea not to use any undocumented stuff, we try not to. We are working to find a way to replace code which uses HelpCenter object anywhere.

    0
  • Diziana
    Comment actions Permalink

    @Tobias: We are glad that it helped you.

    @Jennifer: Where is our goody for the tip? ;-)

    0
  • Jennifer Rowe
    Comment actions Permalink

    Hey Diziana,

    I sent you something via email a few months back, but it looks like it was never redeemed. Email me at community@zendesk.com and I'll give you the link again! You've definitely earned it. :)

    0

Please sign in to leave a comment.

Powered by Zendesk