mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
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:
parent
99c381a05a
commit
0fd3d7e085
1 changed files with 8 additions and 1 deletions
|
|
@ -170,7 +170,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if a permission for file download is granted
|
// 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');
|
if(!Context::get('is_logged')) return $this->stop('msg_not_permitted_download');
|
||||||
$logged_info = Context::get('logged_info');
|
$logged_info = Context::get('logged_info');
|
||||||
if($logged_info->is_admin != 'Y') {
|
if($logged_info->is_admin != 'Y') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue