[bug] Forms exempt from user/group permission settings

Hi all,

While onboarding new users, it's important to show them only what they should see. For example, a single app or folder.

This works by restricting workflows, resources, and apps, but Forms still show up. There don't seem to be any settings for controlling which Forms, if any, are visible to a certain permission group.

I'm assuming it's because Forms are so new, but it's confusing to users who should only see a single app when they see a shiny button to start creating Forms unrestricted.

Hello @trz-justin-dev!

Yes you can hide forms from users based on the evaluation of custom Javascript code that you must add in to the form component. When you inspect the form component under Appearance tab is an input field titled Hidden.

To the right of this there is a box to put in code snippets, where if the Javascript in the box evaluates to true it will be hidden from the user.

For example you can access the groups a user belongs to as an array of objects with current_user.groups, where each object has a 'name' property which is a string of the groups name.

Then use some code such as .includes(' ') to check for inclusion or a strict equivalency operator such as === to check for exact matches.

You can read more about this at the link here where they give an example of using .map to iterate over the array of group objects. Hope this helps and let me know if you have any more questions!

Hi @Jack_T !

Thank you for your reply.

I might've been to vague in my post; I want to hide the existence of Forms from some user groups entirely.

When a new user first logs in, they don't see Resources, Workflows, or Apps, because we can disable those on a group-permission level.

However, Forms has no such option in the permissions settings UI.

As a workaround in the meantime, we redirect their home page to an app, which works because they can't navigate up and out of the app. But as soon as they need to access more than one app, they will be able to see and create Forms unrestricted. As a secondary concern, they may incur billing costs if they create many new Forms.

Hi @trz-justin-dev

Thank you for further specifying, are you referring to the 'Form's button in the header/at the top of the page when a user logs into a Retool account? On the right in the picture?

This is a new addition so I can further check with the team about this and if we don't have an option to hide this, I can make a feature request internally!

1 Like

Hey @Jack_T

Yeah that's correct!

Not a blocker or anything for us right now.

Thank you!