Previous page | Site security - users and permissions | Next page |
Using redirection to first-child as a permission switch |
This is an advanced technique that allows you to give people one common address to browse to, but which results in them ending up viewing different pages depending on which usergroup they are in. In the example below we will construct a switch which is the equvalent of saying: "If the user is in group A then show page X otherwise show page Y" To create the switch:
Now, when a user browses to the 'switch' secion, they will be redirected to the first child component in that section. However, the site takes them to the first child that they have permission to view, so, depending on the usergroup they are in, this will be page X or page Y Redirecting to different sections In many situations, you will not actually want the user to remain on a page with the 'switch' page as a parent, but need them to be elsewhere on the site. To do this, simply add page Redirects to page X and Y that redirect out to the desired locations. More than two options You can have more than two options. Be sure to sequence them so that the page with the most restrictive permissions is listed first.
|