-
Notifications
You must be signed in to change notification settings - Fork 10
Implemented audit logs in mysql #69
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
Conversation
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.
The PHP implementation and bootstrapping looks good. Something to keep in mind is that the operator will not always be the user object. Admins can access the web portal as their user and modify a user's ssh keys, for example. In that case the admin would be the operator.
I think the best way to do this is by including an optional "operator" parameter for the setsshkeys method, which would be filled in with the global $USER
variable.
Any thoughts on this?
Yes, adding the optional "operator" parameter makes sense for the setsshkeys method. @hakasapl Can you explain how would I go about getting the global |
The |
When I tried using the |
You're right - I forgot how that worked. I just made a PR but accidentally merged it with my last PR before I could request a review from you. See this commit: e4cd4be That's now merged, so once you sync your fork you can use the $OPERATOR variable which will always be the user signed in, and the $USER var, which will stay the same. |
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.
Looks good. I will merge this, I assume you'll make another PR for auditing everything else? I will add a message to the issue listing each case we should have a log for
audit_log
addLog()
to add logs to the table