-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the ability to bulk print users #15534
Conversation
PR Summary
|
… class from eula table
->withTrashed() | ||
->findMany($request->input('ids')); | ||
|
||
$users->each(fn($user) => $this->authorize('view', $user)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not positive about this since the top of the controller method has $this->authorize('update', User::class);
...might end up in a place where the user has access to view users but not update them?
Or maybe I should make this $this->authorize('view', User::class);
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can start with $this->authorize('view', User::class);
and add the stronger gates within that faux-router controller method.
@snipe this is ready for a review. Please check out my question in the description noted with the ❓ and my review comment. |
Update for #15534 - Refined gates on user bulk
Description
This PR allows printing all assigned items for multiple users via the bulk actions menu on the user index page.
Here's what will be rendered in the browser:
And bringing up the print dialog will put all of the users on a separate page:
Some additional details...
I updated the existing template,
users.print
, to accept multiple users and render them in aforeach
on the front end.When rendering multiple users I added a button to the top of the page to show and hide all of the EULAs on the page so they can be included in printing:
Partially addresses sc-18607
Type of change