user block, trying to pick out ONLY permissions we wanna see

This commit is contained in:
akemidx 2024-02-20 18:25:41 -05:00
parent f7d0cecdac
commit 8bbf6da052

View file

@ -584,6 +584,8 @@ class UsersController extends Controller
$user_groups .= $user_group->name.', '; $user_groups .= $user_group->name.', ';
} }
$userperm = User::where('permissions','LIKE','%admin%');
// Add a new row with data // Add a new row with data
$values = [ $values = [
$user->id, $user->id,
@ -601,7 +603,8 @@ class UsersController extends Controller
$user->accessories->count(), $user->accessories->count(),
$user->consumables->count(), $user->consumables->count(),
$user_groups, $user_groups,
$user->permissions, // ? $user->permissions->where('permissions', 'LIKE', '%"1"%') : '', $userperm ? $user->permissions : '',
//$user->permissions, // ? $user->permissions->where('permissions', 'LIKE', '%"1"%') : '',
//where json like '%"category":"Category Example"% //where json like '%"category":"Category Example"%
$user->notes, $user->notes,
($user->activated == '1') ? trans('general.yes') : trans('general.no'), ($user->activated == '1') ? trans('general.yes') : trans('general.no'),