Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# leecook 4/16/2007 11:40 PM
morning,

What can I call to check a user is an admin user ect?

cheers,

Lee
# XscorX 4/17/2007 2:32 AM (edited 4/17/2007 2:36 AM)
you can find that by using this command
 
if ( User.Identity.IsAuthenticated )
   {
       User cuyahogaUser = User.Identity as User;
       if ( cuyahogaUser.HasPermission( AccessLevel.Administrator) )
       {
          // to do
       }
   }

Here you check if the user is authorized first then you check if this user i part of specified role