This project is read-only.
The TimedRole is a role that allows you to setup a daily interval where the user will belong to that role. Let’s imagine that you only want editors to be able to publish new content between 9 and 5. Then you simply make sure that the Publish permission is only granted to this role (perhaps in combination with another role). It's also a great way to identify business vs. personal visitors to your site and use it to target content for either b2b or b2c.
Register it under <virtualRoles> in web.config like this:
<add name="Daytime" type="EPiServer.Research.VirtualRoles.TimedRole, VirtualRolesSamplePack" start="09:00:00" stop="17:00:00" includeweekends="false"/>

Parameters are:
  • start The start time in the format HH:MM:SS.
  • stop The stop time in the format HH:MM:SS
  • includeweekends Optional Boolean. If set to false, weekend users will not be in the role.

Last edited Nov 2, 2009 at 7:34 PM by AllanThraen, version 2


No comments yet.