NOTFORMERGE: Merged r83631 from branches/2.3

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@84119 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2009-08-11 01:08:29 +00:00
parent 089483b2f4
commit c68e3f8875

View File

@ -28,6 +28,13 @@ class AssetAdmin extends LeftAndMain {
*/
public static $allowed_extensions = array();
/**
* If this is true, then restrictions set in $allowed_max_file_size and
* $allowed_extensions will be applied to users with admin privileges as
* well.
*/
public static $apply_restrictions_to_admin = false;
static $allowed_actions = array(
'addfolder',
'deletefolder',
@ -191,7 +198,7 @@ JS
}
// validate files (only if not logged in as admin)
if(Permission::check('ADMIN')) {
if(!self::$apply_restrictions_to_admin && Permission::check('ADMIN')) {
$valid = true;
} else {
$upload = new Upload();