Hide/Show components based off of permission group

So I've been having some fun with changing images depending on who the current user is with {{current_user.email}} but what would be really useful is the ability to reference the array of groups the current user is in so that we can hide/show containers and buttons depending on whether or not the person is in the 'Customer Service' group that we have set up.

You can do something like this: {{current_user.groups.some(i => i.name === 'Customer Service')}} and place it in the field at the very bottom of the component editor – the section “Hide (collapse) this component when true”

Oh excellent. My bad, I’ve been completely misreading the array this entire time and only just realised that of course Customer Service wouldn’t show up on the tooltip - because I’m not actually in that group.

3 posts were split to a new topic: Hide / Show Components in Public App