Skip to content

Commit

Permalink
Hide access cards on service accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
kberzinch committed Sep 8, 2024
1 parent f98e85e commit 4ef8308
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Nova/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ public function fields(NovaRequest $request): array
->hideFromDetail(static fn (NovaRequest $r, AppModelsUser $u): bool => $u->is_service_account),

HasMany::make('Access Cards')
->canSee(static fn (Request $request): bool => $request->user()->hasRole('admin')),
->canSee(static fn (Request $request): bool => $request->user()->hasRole('admin'))
->hideFromDetail(static fn (NovaRequest $r, AppModelsUser $u): bool => $u->is_service_account),

HasMany::make('Attendance')
->canSee(static function (Request $request): bool {
Expand Down

0 comments on commit 4ef8308

Please sign in to comment.