Custom User Groups Overview
Creating custom user groups in Softr
Apart from making a block (or a page) accessible to logged-in or non-logged-in users, you can also create User Groups with custom conditions and add one or more user groups to block's visibility settings, so that only those groups can access the block. User groups are also used when defining edit permissions.
Let's see how User Groups are created.
Creating User Groups
To create a user group, you need to navigate to Settings => User Groups & Permissions => User Groups. The Logged in users groups will always be there by default, and you can use the Add user group button at the bottom to create a new custom group.
In the pop-up that opens next, you first need to set a name for the group.
Further on, you need to add all the necessary conditions based on which the user will be included in the group. Let's see how that works.
First of all, from the dropdown at the top you should choose whether the user needs to meet any or all of the conditions defined below to be included in the group.
You can add as many conditions as required, and they'll be joined with OR (match any is selected) or AND (match all is selected).
Now, let's add a condition using the Add condition button to see how it's configured. There are three fields in Condition Settings, so let's see how each of those works.
First, you need to select the attribute for which you want to set a condition. There are the following options:
- One-time Product
- Logged in User's
The first two are payment-related conditions and the last one is based on logged in user's attributes. You can find a detailed overview of each condition type in its corresponding articles, so let's just complete the user group creation and see how it's assigned to a block.
Adding a user group to block’s visibility
As soon as you've set all the necessary conditions, just hit the Create user group button and the created group will appear in your list of user groups.
Now you can use the created group when defining the visibility conditions for a particular block. Navigate to block's visibility settings, select Logged in users, click Add user group, and select the group from the list.
That's it. Now, only the users that are part of the selected group will be able to access the block. Please, not that you can add more than one user group to a given block.
You can select user groups when setting up page visibility the same way.
Last updated on December 6, 2022