Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 3rd, 2009, 08:49 AM
Authorized User
 
Join Date: Mar 2009
Posts: 68
Thanks: 6
Thanked 0 Times in 0 Posts
Question Page 178 needs to be address

in the ENTUserAccountEO class there's code that I think should be change or needs to be address.

Code:
 
publicENTRoleCapabilityEO.CapabilityAccessFlagEnum GetCapabilityAccess(int capabilityId, ENTRoleEOList rolesWithCapabilities)
{
ENTRoleCapabilityEO.CapabilityAccessFlagEnum retVal = ENTRoleCapabilityEO.CapabilityAccessFlagEnum.None;
//the roles in the user object do not include the capabilities.
foreach (ENTRoleEO role in Roles)
ENTRoleEO roleWithCapabilities = rolesWithCapabilities.GetByRoleId(role.ID);
this line needs to be change from this

Code:
foreach (ENTRoleEO role in Roles)
{
 


to

Code:
foreach (ENTRoleEO role in rolesWithCapabilities)
{
 

 
Old April 4th, 2009, 12:14 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

The code in the book is correct. The foreach loop is looping through the Roles because the Roles property has all of the roles this user is in. The rolesWithCapabilities is the master list of roles with all the associated capabilities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Read the mail address from the web page gmbalaa General .NET 0 September 14th, 2007 04:12 AM
Deleting a Record pg. 178 Chapter 6 Mantis_Atlantis BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 March 13th, 2006 02:26 PM
Print an web page without URL address rekha_jsr Servlets 1 September 16th, 2004 05:15 AM
Stop page address printing patwadd Classic ASP Databases 2 February 20th, 2004 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.