-
Notifications
You must be signed in to change notification settings - Fork 22
/
_config.php
43 lines (35 loc) · 1.47 KB
/
_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Secure Files Module Configuration
*
* @package securefiles
* @author Hamish Campbell <[email protected]>
* @copyright copyright (c) 2010, Hamish Campbell
*/
define('MODULE_SECUREFILES_PATH', basename(dirname(__FILE__)));
Director::addRules(50, array(ASSETS_DIR . '/$Action' => 'SecureFileController'));
AssetAdmin::require_css(MODULE_SECUREFILES_PATH . '/css/SecureFiles.css');
// -------------------------------
/**
* Apply optional permission methods here. Include them in the reverse
* order that you would like them to appear in the CMS.
*/
// Assign file security by individual member:
// DataObject::add_extension('File', 'SecureFileMemberPermissionDecorator');
// Assign file security by member group:
// DataObject::add_extension('File', 'SecureFileGroupPermissionDecorator');
// Create time-limited access tokens:
// DataObject::add_extension('File', 'SecureFileTokenPermissionDecorator');
// -------------------------------
DataObject::add_extension('File', 'SecureFileDecorator');
/**
* For large files or heavily trafficed sites use x-sendfile headers to by-pass
* file handling in PHP. Supported in lighttpd and in Apache with mod_xsendfile
* available at http://tn123.ath.cx/mod_xsendfile/
*/
// SecureFileController::use_x_sendfile_method();
/**
* For testing or debug purposes, you can force this module to use the internal
* Sapphire send file method. Not recommended for production sites.
*/
// SecureFileController::use_ss_sendfile_method();