title: Check User Permission to Site or Workspace given a URL
body: <p>Given a list of Workspaces:</p>
  
  <pre><code>http://server/managed_path/sitecoll/basic
  http://server/managed_path/sitecoll/blank
  http://server/managed_path/sitecoll/decision
  http://server/managed_path/sitecoll/multipage
  http://server/managed_path/sitecoll/social
  </code></pre>
  
  <p>How can I call DoesUserHavePermissions() - or something similar - to find out if the currently logged in user can access the web site?</p>
  
  <p>I am writing a user control to output a list of workspaces they have access to, but when I try to check, I get a variety of errors I can't seem to work around with this code:</p>
  
  <pre><code>foreach (String s in workspaces)
  {
      using (SPSite site = new SPSite(s))
      {
          using (SPWeb web = site.OpenWeb(s))
          {
      // web.DoesUserHavePermissions(...)
          }
      }
  }
  </code></pre>