Skip to content
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

feat: Enable base constructs to automatically populate "created_by" and "last_updated_by" fields for relevant objects #1944

Merged
merged 8 commits into from
Oct 28, 2024

Conversation

mattzh72
Copy link
Collaborator

@mattzh72 mattzh72 commented Oct 26, 2024

Description:

Enable base constructs to automatically populate "created_by" and "last_updated_by" fields for relevant objects. We apply this to Tools, but this will set the foundation for future ORM refactors.

We also change it so we thread the entire actor (User) through the requests - this simplifies the API, and also allows us to do some simple access predicate checking where we confirm the actor of the request belongs to the organization the object (Tool, Agent) is associated with.

Testing:

Ensured existing tests pass and added a new test case:

  • Confirms that if multiple users on the same org, and a different user edits the Tool, then the last_updated_by field is updated but created_by is not

@sarahwooders sarahwooders self-requested a review October 26, 2024 01:00
@mattzh72
Copy link
Collaborator Author

no merge yet, fixing some small issues

@mattzh72 mattzh72 merged commit 0768b96 into main Oct 28, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants