Restricting Access to a Group of Users¶
TYPO3 lets you restrict access to pages and or content element. Restricting access to a page will make the page totally unavailable when the condition is not met. If however you restrict access to a given content element, the same will apply to the corresponding content element, allowing you to show or hide part of a page according to the restriction you put in place.
The types of condition are:
- Start and/or End date
- Page or content will be visible from and/or to a given date and time.
- Hide at login
- Page or content will be hidden as soon as a member is authenticated (and thus has access to the LionsBase Intranet). This effectively shows content only when an anonymous user is visiting the website.
- Show at any login
- This is the the other way around, page or content will be accessible as soon as a member is authenticated.
- Restrict access to a group of users
- Only valid for authenticated members. In addition, they must to be member of the corresponding group for the condition to be met.
Use the icon to modify a page or a content element. The icon for the page itself is located in the toolbar, on top of the screen:
Open the tab “Access” (may either be one of the first tabs or for a page the last one):
Select the conditions to be met and save your changes by clicking on one of the save icons () in the toolbar.
When editing access rights for a page, the checkbox “Extend to Subpages” lets you automatically inherit access restrictions on subpages. Please read on for further details on Access Inheritance.
Visual Hint of Access Restriction¶
TYPO3 visually shows that a page has access restrictions in place:
You may hover your mouse over the page’s icon in the page tree to show a tooltip with useful access restriction overview:
In this example, access to the page is restricted to members of LC Wien Schwarzenberg.
Similarly, if you define access restrictions on content elements themselves, TYPO3 will show as well the restriction with a person overlay on the corresponding content element’s icon:
Unfortunately, the tooltip of protected content elements does not show information on the access restrictions so you will have to edit the content element to check them.
Groups of Members¶
LionsBase automatically creates some predefined groups:
- A group for all active members of a club. The label of the group is simply the name of the club.
- A group for all active members of the committee of a club. The label of the group is the name of the club prefixed by “[C]” that stands for “committee”.
- A group for all active members of the committee of a club but with special functions. The label of the group is the name of the club prefixed by “[CE]” that stands for “committee extended”.
If you select more than one condition, then any one of the conditions will have to be met (disjunction).
Special user groups may be available for members having a given Lions function (e.g., “District Governor”). Please read chapter Frontend User Group of for further details.
Imagine the following structure of pages:
Homepage |── Page 1 |── Page 2 | |── Page 2.1 | `── Page 2.2 `── Page 3
If you put access restriction “Show at any login” on “Page 2”, members who are not authenticated will see a trimmed-down list of pages:
Homepage |── Page 1 `── Page 3
whereas authenticated members will see the whole structure.
As a rule of thumb, you should always tick the checkbox “Extend to Subpages” when setting access restrictions on pages with subpages, just to keep access inheritance simple and logical.
Now, imagine that in addition to the restriction “Show at any login” on “Page 2”, you put another restriction “Wien Schwarzenberg” on “Page 2.1”. Authenticated members who are not members of LC Wien Schwarzenberg will see following list of pages:
Homepage |── Page 1 |── Page 2 | `── Page 2.2 `── Page 3
As expected, “Page 2.1” is hidden and not accessible.
This is the reason why you should pay attention to go from very permissive to fine-grained access restrictions when you move deeper in the hierarchy of pages and not the other way around.