Merge pull request #1011 from openclassify/vedatakd

auth preview page
This commit is contained in:
Muammer Top 2021-03-29 10:40:21 +03:00 committed by GitHub
commit e9eb2147a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 0 deletions

View File

@ -624,6 +624,10 @@ class AdvsController extends PublicController
$adv = $this->adv_repository->getListItemAdv($id); $adv = $this->adv_repository->getListItemAdv($id);
if (!Auth::check() or ($adv['created_by_id'] != auth()->id() and !Auth::user()->isAdmin())) {
abort(403);
}
for ($i = 1; $i <= 10; $i++) { for ($i = 1; $i <= 10; $i++) {
$cat = "cat" . $i; $cat = "cat" . $i;
if ($adv->$cat != null) { if ($adv->$cat != null) {

View File

@ -0,0 +1,57 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| HTTP CACHE ENABLED
|--------------------------------------------------------------------------
|
| Do you want to enable HTTP caching?
|
*/
'enabled' => env('HTTP_CACHE', false),
/*
|--------------------------------------------------------------------------
| DEFAULT TTL
|--------------------------------------------------------------------------
|
| What is the default TTL value (seconds)?
|
*/
'ttl' => env('HTTP_CACHE_TTL', 3600),
/*
|--------------------------------------------------------------------------
| EXCLUDED PATHS
|--------------------------------------------------------------------------
|
| Specify cache-excluded paths.
| Use * for partial matching.
|
*/
'excluded' => [
'/advs/create_adv',
'/advs/edit_advs/*',
'/profile',
'/profile/*',
'/ajax/*',
],
/*
|--------------------------------------------------------------------------
| TIMEOUT RULES
|--------------------------------------------------------------------------
|
| Specify timeout rules per path.
| Use * for partial matching.
|
*/
'rules' => explode(',', env('HTTP_CACHE_RULES', '')),
];