check if user has full permissions for Sharepoint List

  1. SPUser user = SPContext.Current.Web.CurrentUser;  
  2.             SPWeb oWeb = SPContext.Current.Web;  
  3.             SPList oList = oWeb.Lists["MyList];  
  4.             string status= string.Empty;  
  5.             if (oList != null)  
  6.             {  
  7.   
  8.                 if (oList.DoesUserHavePermissions(user, SPBasePermissions.FullMask))  
  9.                 {  
  10.                     status = "Administrator";  
  11.                 }  
  12.                 else  
  13.                 {  
  14.                     status=  = "NonAdministrator";  
  15.                 }  
  16.             }