Custom Permissions Restrictions
Custom Permissions Restrictions
By Paul
09/25/03 (Edited 03/10/14)
You may wish to restrict a page to only be visible to particular usergroups. For example, you may have a custom template page which you only want registered members to be able to view. This can be done very simply by placing a comment like this at the very top of the template:
<!-- RESTRICT TO GROUPS 2,3 -->
Change 2,3 to the numbers of the usergroups you wish to allow to view the page. Separate each usergroup number with a comma, no spaces. By default, of course, pages are visible to all groups (except where usergroup permissions specify otherwise).
As of version 5.1.0, you and also deny from particular groups instead of writing out all the approved groups:
<!-- RESTRICT FROM GROUPS 2,3 -->
Using FROM instead of TO means that groups 2 and 3 won't be allowed to view, and all unspecified groups will be able to view (unless normal usergroup permissions forbid them).
For a category, you can restrict a usergroup from having access simply by editing the category.
By Paul
09/25/03 (Edited 03/10/14)
<!-- RESTRICT TO GROUPS 2,3 -->
Change 2,3 to the numbers of the usergroups you wish to allow to view the page. Separate each usergroup number with a comma, no spaces. By default, of course, pages are visible to all groups (except where usergroup permissions specify otherwise).
As of version 5.1.0, you and also deny from particular groups instead of writing out all the approved groups:
<!-- RESTRICT FROM GROUPS 2,3 -->
Using FROM instead of TO means that groups 2 and 3 won't be allowed to view, and all unspecified groups will be able to view (unless normal usergroup permissions forbid them).
For a category, you can restrict a usergroup from having access simply by editing the category.
Description | Restricting access to any page. |
Rating | |
Views | 1891 views. Averaging 0 views per day. |