implementation for has_permission

https://github.com/plone/plone.api/issues/172
The documentation tests should not be used as unit test. In other words: only test that the code example actually works. In this case, "assert can_view == True" is enough.