silverstripe-labs/silverstripe-dms — pull request #36 by ajshort (2013-10-11 10:59:22+00:00)
Title: BUG: Fix access to documents on the staging site.

The DMS document controller had been changed to subclass ContentController
to correctly initialise the versioned stage. However, this had the side
effect of preventing access to documents when the "Stage" stage
was selected.

ContentController::init() calls the SiteTree::canViewStage() method, which
controls access when on the stage. However, since the data record was
non-existant, the method would always return false, preventing access to
documents.

This fix removes the subclassing of ContentController and just directly
initialises the versioned stage.