Hi there,
I need to set up access rules for multiple users and I'm confused as the the best way to do it.
Basically I have a number of different users who all have a single page on the website. I want them to be able to edit their page only and have no access to any other pages on the website.
Could someone walk me through the best way to set this up?
Do I need to create a seperate User Group and Resource Group for each user/page, or do I create a single User group, assaign all the pages to it and then use roles to limit access to a single resource?
On a seperate note, is it possible to have the user taken directly to their resource page upon logging in?
Many thanks in advance
You will definitely need a user group for each user. With roles, users have the permissions of everyone whose role in the group has a higher authority number, so there's no way to restrict users to a single page with roles in a group.
There is a simple way to restrict users to their own pages with a snippet, but it won't be reflected in calls to Wayfinder or getResources, so it's usually not a good solution.
It's possible to have a plugin connected to OnUserFormSave that creates the users's user group, adds the user to it, creates the users resource, creates the user's resource group, and adds the user's page to the user's resource group.
Creating the ACL entry to set the permission is more complicated, but doable.