Improve code example in permissions doc page.
Small code simplification.
Spacing.
Use the middleware in views to decide whether to display the draft or published object.

This removes duplicated logic.