mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-07 13:56:05 -06:00
permission update for rotate image
This commit is contained in:
parent
9475551188
commit
4589d49a45
@ -118,8 +118,11 @@ class UploadController extends AdminController
|
|||||||
$path = explode('/', $parsed['path']);
|
$path = explode('/', $parsed['path']);
|
||||||
$filename = end($path);
|
$filename = end($path);
|
||||||
|
|
||||||
$isImageUser = FilesFilesEntryModel::query()->where('created_by_id', Auth::id())
|
$isImageUser = FilesFilesEntryModel::query();
|
||||||
->where('name', $filename)->first();
|
if (!auth()->user()->hasRole('admin')) {
|
||||||
|
$isImageUser = $isImageUser->where('created_by_id', Auth::id());
|
||||||
|
}
|
||||||
|
$isImageUser = $isImageUser->where('name', $filename)->first();
|
||||||
if ($isImageUser != null) {
|
if ($isImageUser != null) {
|
||||||
WaterMark::make(Storage::path('images/' . $filename))->rotate(90)
|
WaterMark::make(Storage::path('images/' . $filename))->rotate(90)
|
||||||
->save(app_storage_path() . '/files-module/local/images/' . $filename);
|
->save(app_storage_path() . '/files-module/local/images/' . $filename);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user