You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add extra fields to the CRUD event model. My use case is that my application has a feature to invite users who can work on the account owner's data. To do that, I have a middleware that updates request.user with the account owner, in case an invited user is logged in. Also, set request._shared_user to the user who is logged in and acting.
In this case, all events are being logged with the owner user as user instance and, who has performed the event is not being logged.
Could I extend the base CRUD Event table and add a field like shared_user = models.ForeignKey(User) and then update the crud() method to add shared_user = request._shared.user
The text was updated successfully, but these errors were encountered:
I want to add extra fields to the CRUD event model. My use case is that my application has a feature to invite users who can work on the account owner's data. To do that, I have a middleware that updates
request.user
with the account owner, in case an invited user is logged in. Also, setrequest._shared_user
to the user who is logged in and acting.In this case, all events are being logged with the owner user as user instance and, who has performed the event is not being logged.
Could I extend the base CRUD Event table and add a field like
shared_user = models.ForeignKey(User)
and then update thecrud()
method to addshared_user = request._shared.user
The text was updated successfully, but these errors were encountered: