title: How to check user permissions at SharePoint 2010 using Client Object Model?
body: <p>The following code always returns <strong>false</strong> (which is incorrect, as the user has Full Control permission at the site level): </p>
  
  <pre><code>Site site;
  BasePermissions permissionMask;
  ClientResult&lt;bool&gt; result;
  
  permissionMask = new BasePermissions();
  permissionMask.Set(PermissionKind.ManageWeb);
  result = site.DoesUserHavePermissions(permissionMask);
  
  return result.Value;
  </code></pre>
  
  <p>I am trying to utilize new SharePoint 2010 Client Object Model. I was thrilled when I discovered DoesUserHavePermissions method, but it appears that I'm not really sure if I know how to use it. I have no idea whether I am using the correct mask, or whether I should  specify the user account for which I wish to check the permissions level? Any help would be greatly appreciated. Thanks. </p>