Apps/Controller/Api/Content/ActionGalleryList.php 1 location
|
@@ 37-39 (lines=3) @@
|
34 |
|
$this->setJsonHeader(); |
35 |
|
|
36 |
|
// check if user have permission to access there |
37 |
|
if (!App::$User->isAuth() || !App::$User->identity()->role->can('global/file')) { |
38 |
|
throw new NativeException('Permission denied'); |
39 |
|
} |
40 |
|
|
41 |
|
$thumbDir = Normalize::diskFullPath('/upload/gallery/' . $id . '/orig/'); |
42 |
|
if (!Directory::exist($thumbDir)) { |
Apps/Controller/Api/Content/ActionGalleryUpload.php 1 location
|
@@ 44-46 (lines=3) @@
|
41 |
|
} |
42 |
|
|
43 |
|
// check if user have permission to access there |
44 |
|
if (!App::$User->isAuth() || !App::$User->identity()->role->can('global/file')) { |
45 |
|
throw new NativeException(__('Permissions to upload is denied')); |
46 |
|
} |
47 |
|
|
48 |
|
// check if directory exist |
49 |
|
if (!Directory::exist('/upload/gallery/' . $id)) { |