Skip to content

Instantly share code, notes, and snippets.

@DeskWOW
Created August 6, 2014 13:34
Show Gist options
  • Save DeskWOW/30b0bc339ba1a4a8e840 to your computer and use it in GitHub Desktop.
Save DeskWOW/30b0bc339ba1a4a8e840 to your computer and use it in GitHub Desktop.
Private Portal — Require manual user (customer) approval to allow support center access
{% unless current_user == nil or current_user.is_guest %}
{% if current_user.customer.custom_portal_access == "true" || current_user.customer.custom_portal_access == true || current_user.customer.custom_portal_access == "1" || current_user.customer.custom_portal_access == 1 %}
Success! You'll want ALL code currently in your 'Layout' to go here so the site loads.
{% else %}
If the user sees this text, it means they logged in, but not manually approved.
{% endif %}
{% else %}
If the user sees this text, it means they are not logged in. So you'll likely want to prompt them to login or auto redirect them to login page here.
{% endunless %}
@aragudos
Copy link

Just a quick question, is this only applied on the front end of the customer portal? Can this be applied in the back end? Is there a way to manually manage portal users by admin in the back end like on the link below? Kindly advise please and thanks!

https://company.desk.com/admin/channels/support-center/portal-users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment