-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Logging Audit on Checkin/out #16679
base: develop
Are you sure you want to change the base?
Logging Audit on Checkin/out #16679
Conversation
PR Summary
|
@@ -71,6 +71,10 @@ public function store(AssetCheckoutRequest $request, $assetId) : RedirectRespons | |||
|
|||
$admin = auth()->user(); | |||
|
|||
if($request->filled('audit_on_checkinout') == "1") { | |||
$this->authorize('audit', Asset::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.
This will probably result in a forbidden error, which is probably not what we want. We probably want to quietly ignore if they don't have permission to audit.
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.
okay yea. i see how that could happen.
Adding in an option to log an audit when you check in or out an asset.

There is less information on the audit itself, but all changes to an asset will be logged on the checkin or out.
NOTE: This action does not allow a user to manually set a next audit date OR upload a picture as these are not options on checkin or checkout