issue 859 check file download permission, when guest access

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9804 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-11-07 08:45:13 +00:00
parent 99c381a05a
commit 0fd3d7e085

View file

@ -170,7 +170,14 @@
}
// Check if a permission for file download is granted
if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) {
$downloadGrantCount = 0;
if(is_array($file_module_config->download_grant))
{
foreach($file_module_config->download_grant AS $value)
if($value) $downloadGrantCount++;
}
if(is_array($file_module_config->download_grant) && $downloadGrantCount>0) {
if(!Context::get('is_logged')) return $this->stop('msg_not_permitted_download');
$logged_info = Context::get('logged_info');
if($logged_info->is_admin != 'Y') {