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

tweak(platform): Limit templates to users #8271

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

Swiftyos
Copy link
Contributor

@Swiftyos Swiftyos commented Oct 7, 2024

Background

The original design of our template system did not anticipate the addition of user accounts, nor was it intended for cloud deployment. As a result, templates added by one user are currently visible to all users. This behavior is not only unexpected but also inconsistent with our intended use case.

This pull request updates the template system to restrict visibility to the creator of the template, aligning with the multi-user cloud environment.

Changes 🏗️

  • User-Specific Template Visibility: Ensures that templates are only visible to the user who created them.

Testing Guidelines 🔍

Note

These tests are specifically for the new AutoGPT platform, located within the autogpt_platform/ directory.

Please ensure that your changes are thoroughly tested and perform reliably. Below are some key scenarios to test:

  • Agent Creation: Create an agent from scratch with at least 3 blocks and verify its execution.
  • Agent Importation: Import an agent via file upload and ensure it executes correctly.
  • Marketplace Upload: Upload an agent to the marketplace and verify its upload integrity.
  • Marketplace Importation: Import an agent from the marketplace and confirm its functionality.
  • Agent Modification: Edit an agent from the monitor view and verify that the changes are implemented correctly.

@Swiftyos Swiftyos requested a review from a team as a code owner October 7, 2024 07:23
@Swiftyos Swiftyos requested review from ntindle and majdyz and removed request for a team October 7, 2024 07:23
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

API Change
The get_templates method has been modified to include a user_id parameter, which is used to filter templates by user. This change needs to be reflected in the API documentation and any client-side code that calls this endpoint.

@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end size/s labels Oct 7, 2024
Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit a98a5d1
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6703ae894021f00007ec63f9

@aarushik93 aarushik93 merged commit fd99686 into master Oct 7, 2024
14 checks passed
@aarushik93 aarushik93 deleted the swiftyos/open-1914-limit-templates-to-user branch October 7, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants