Apps/Controller/Api/Content.php 1 location
|
@@ 64-66 (lines=3) @@
|
| 61 |
|
|
| 62 |
|
// get current user and check is authed |
| 63 |
|
$user = App::$User->identity(); |
| 64 |
|
if ($user === null || !App::$User->isAuth()) { |
| 65 |
|
throw new ForbiddenException(__('Authorization is required!')); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
// set ignored content id to rate in session |
| 69 |
|
$ignored = App::$Session->get('content.rate.ignore'); |
Apps/Controller/Front/Feedback.php 1 location
|
@@ 45-47 (lines=3) @@
|
| 42 |
|
{ |
| 43 |
|
// get configs |
| 44 |
|
$configs = $this->getConfigs(); |
| 45 |
|
if (!App::$User->isAuth() && !(bool)$configs['guestAdd']) { |
| 46 |
|
throw new ForbiddenException(__('Feedback available only for authorized users')); |
| 47 |
|
} |
| 48 |
|
|
| 49 |
|
// initialize model |
| 50 |
|
$model = new FormFeedbackAdd((int)$configs['useCaptcha'] === 1); |
Apps/Controller/Front/Profile/ActionShow.php 1 location
|
@@ 34-36 (lines=3) @@
|
| 31 |
|
public function show($userId) |
| 32 |
|
{ |
| 33 |
|
$cfg = $this->application->configs; |
| 34 |
|
if (!(bool)$cfg['guestView'] && !App::$User->isAuth()) { |
| 35 |
|
throw new ForbiddenException(__('You must login to view other profile')); |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
// check if target exists |
| 39 |
|
if (!App::$User->isExist($userId)) { |