Restricted Area
| Version | Released | Type | License |
|---|---|---|---|
| 0.9.2 | 2009-10-15 | Modules | Commercial (?) |
The Restricted Area module lets you create areas of restricted content and allow access on group and/or member level.
Imagine you have sections of content that are restricted to be viewed by registered members only, say Football and Hockey. Some members are allowed to access Football others Hockey.
In ExpressionEngine you normally handle this with member groups. You create a group (ID 5: Hockey) that is allowed to see Hockey and then check against the logged-in member’s group:
{if group_id == 5} Show Hockey stuff{/if}
Likewise you create another one for Football (ID 6: Football):
{if group_id == 6} Show football results.{/if}
Now if you want to allow some, but not all, members to see both sections you actually have to create a third member group (ID 7: Hockey+Football) because one member cannot belong to multiple groups at the same time.
{if group_id == 5 OR group_id == 7} Show Hockey stuff{/if}
{if group_id == 6 OR group_id == 7} Show football results.{/if}
If we added another section we would already need 7 member groups to handle access:
- Hockey
- Football
- Soccer
- Hockey+Football
- Hockey+Soccer
- Football+Soccer
- Hockey+Football+Soccer
{if group_id == 5 OR group_id == 7 OR group_id == 8 OR group_id == 10} Show Hockey stuff{/if}
Um?
At the latest when adding a 4th section you’ll notice that this approach is no longer feasible. Do the math.
The Restricted Areas module uses a different approach to this problem. First you define areas (or sections or whatever) of content and then you can allow individual members or member groups access to these areas.
See the docs for more details.
Commercial means you need to purchase a license in order to obtain and use the addon.
Comments
2009-10-15 14:38
Hi, I am currently looking into your Restricted Area module, and wondering if it supports EE members and groups, or if it creates it’s own members and member groups.