hamishcampbell/silverstripe-securefiles — pull request #3 by marijnkampf (2011-10-27 10:40:10+00:00)
Title: Altered call to extend('onAccessDenied') to allow message changes.

As far as I can tell the current extend('onAccessDenied') doesn't allow for customisation of the failure message displayed to the user. I've altered the call to extend('onAccessDenied') to allow overriding of permission failure message.

Sample code to extend the message:

mysite/code/FileMessage.php

mysite/_config.php
DataObject::add_extension('File', 'FileMessage');

If user doesn't have permission he/she is shown a custom friendly message at the login screen.