3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-05-12 17:45:31 +00:00

Check for licenses.files permissions

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2022-09-16 14:00:27 -07:00
parent 9cae4f1d1b
commit dcab1381e7
6 changed files with 25 additions and 6 deletions

View File

@ -135,6 +135,7 @@ class LicenseFilesController extends Controller
// the license is valid
if (isset($license->id)) {
$this->authorize('view', $license);
$this->authorize('licenses.files', $license);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that asset/file', 500)
@ -171,6 +172,6 @@ class LicenseFilesController extends Controller
}
}
return redirect()->route('license.index')->with('error', trans('admin/licenses/message.does_not_exist', ['id' => $fileId]));
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist', ['id' => $fileId]));
}
}