FEATURE: add permissions into widgets and fix few bugs

This commit is contained in:
Michal Kváček
2017-08-24 01:54:58 +02:00
parent e0f5cba9a4
commit b35149ad67
23 changed files with 239 additions and 110 deletions
@@ -2,6 +2,7 @@
namespace App\CMS\Handlers\Search\Presenters;
use App\CMS\Handlers\Contracts\SearchPresenterHandler;
use App\Models\FileManager\File;
class AdminFiles implements SearchPresenterHandler
{
@@ -14,6 +15,11 @@ class AdminFiles implements SearchPresenterHandler
*/
public function render($foundItems)
{
if (\Auth::user()
->cannot('manage', File::class)) {
return null;
}
return view('admin.fileManager.filesTiles', ['files' => $foundItems, 'hideDelete' => true]);
}
}