In the Lightning Pages we've created so far, we've often made certain sections or buttons visible only to the System Administrator.
What I find inconvenient about this method is that I always have to type the profile name exactly right. And the System Administrator profile doesn’t always have the same name — sometimes (for instance when the org's default language was set to Dutch when it was generated) it’s called “Systeembeheerder” instead.
So we're going to create an alternative solution that works more easily.
In short:
- We'll create a Custom Permission
- We voegen deze toe aan de Monopoly Admin Permission Set die we eerder gemaakt hebben
- In all the different Lightning Pages where we have made section and actions visible to users with a profile named 'System Administrator', we shall change the visibility condition so that it is based on our own Custom Permission.
This is a technique that is easy to learn and use for admins and beginning consultants. Be aware to always make and test these kinds of configuration changes in a sandbox and never do this directly in your production org.
Creating the Custom Permission
In Setup type Permission in the search bar of the left menu and click Custom Permissions.

Click the New button
Give the Custom Permission a name and save it.

Creating the Permission Set and assigning it
In the search bar of the left-hand menu in Setup, type Permission and then click on Permission Sets.

Click on Monopoly Admin to edit this Permission Set.

Click on Custom Permissions, then click the Edit button.


Select your Custom Permission, click the Add button, and then click Save.

Set Conditional Visibility on the Lightning Page
As an example, we’ll edit the entire Details component on the Lightning Page for the Asset Rent Rule object. Regular users shouldn’t be able to edit anything here, but the Admin should have full editing access.
Click on + Add Filter under Set Component Visibility.

Now click on Advanced, then click Select.

From the dropdown menu, select Permissions.

Next, select Custom Permissions, then choose Monopoly_Game_Admin, and finally click Done.

Finally, click Done one last time—and you’re, well… done.

The page then checks whether the user viewing it has the Custom Permission. This can be granted either through their profile or via a Permission Set.
Using Permission Sets offers more flexibility than managing everything through Profiles, and since you don’t have to manually type the Profile name in this approach, it’s also less prone to errors.
Next time, we’ll continue working on our Monopoly game and make sure that players who are in jail can get out again—following the proper rules, of course.