TryGhost/Ghost — pull request #2461 by jgable (2014-03-21 00:41:09+00:00)
Title: canThis() handle no user and internal requests

Closes #2434

- Handle passing undefined user to canThis
- Add existence check to parseContext if statement
- Add unit test that passes undefined to canThis
- Allow internal canThis() checks
- Allow passing 'internal' or { internal: true } as context
- Do not lookup user permissions unless context.user found
- If context.internal, resolve immediately
- Add unit tests for passing 'internal' and { internal: true }