3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-29 20:04:21 +00:00

add auth to api call, gave more specificity to the relationship

This commit is contained in:
Godfrey M
2025-06-05 10:59:16 -07:00
parent 68c082e0dc
commit e2e54677ee
3 changed files with 4 additions and 1 deletions

View File

@ -748,6 +748,8 @@ class UsersController extends Controller
*/
public function eulas(User $user, ActionlogsTransformer $transformer)
{
$this->authorize('view', Asset::class);
$eulas = $user->eulas;
return response()->json(
$transformer->transformActionlogs($eulas, $eulas->count())