p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/forumdisplay.php?f=23)
-   -   A doubt in the EditRole.aspx.cs? (http://p2p.wrox.com/showthread.php?t=21155)

allanhu November 12th, 2004 09:46 AM

A doubt in the EditRole.aspx.cs?
There is a function in the EditRole.aspx.cs

private void Page_Load(object sender, System.EventArgs e)
            // Put user code to initialize the page here
            PhilePrincipal currentPrincipal = (PhilePrincipal)Context.User;
            if (!currentPrincipal.HasPermission((int)AccountsPerm issions.UpdateRoles))
                Response.Write("You don't have sufficient permission to be using this page.");

            if (!Page.IsPostBack)

I can't understand what is about with the "(PhilePrincipal)Context.User"

Who can tell me?

seanmayhew November 13th, 2004 05:55 PM

That casts the default context.user into the principal object created with the file

All times are GMT -4. The time now is 01:46 PM.

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