Roles and Profiles
You can continue to explore each of the user accounts and roles to see who is a member of each group, so you can discover (among other things) that
ChrisH, ChrisU, Dave, and John are reporters.
Dave is a member of all groups, hence he’s the “super user” (who can access all areas of the site — great for testing!).
Lou is only a member of the Fan Club; hence she is the only true fan of the team.
Dan’s the team’s manager and Jim’s the owner.
After digging through the site configuration, in the Access Rules section, you’ll also recall that the Admin section of the site was restricted so that only site administrators could enter that part of the site. Additionally, the Fan Club was restricted so that only members could see the fan club–specific links available in the fan club section.
In the next example, you’ll get to use this configuration and try it out for yourself. The Fan Club for Wrox United is a good place to start.
In the following Try It Out, you build the skeleton for the Fan Club page and see how different users will see a different version of the page, depending on whether they are logged in, and, if the user has logged in, the current user’s identity.
Try It Out |
The Wrox United Fan Club |
1.Open up the chapter version (in C:\BegASPNET2\Chapters\Begin\Chapter11\WroxUnited folder) of the Wrox United application and run the site by pressing Ctrl+F5.
2.Log in to the site as Lou; use the password lou@123. There is a link to the Fan Club (FanClub.aspx) in the menu on the left (shown in Figure 11-5), and to the two sub-pages,
FanClubMatchReport.aspx and FanClubPictures.aspx.
At the moment, the pages are looking a bit empty, so it’s time to start adding some code.
3.Open up FanClub.aspx in Visual Web Developer and switch to Design View.
4.Drag a LoginView control onto the page, as shown in Figure 11-6.
5.Rename the control FCLoginView.
6.You’re going to create three different views on this page:
AnonymousTemplate: Anonymous visitors will be asked to purchase a Fan Club membership before they can access the fan club pages.