Skip to content

fix: hide New agent and New flow buttons for unauthenticated users

Relates to issue #567560 (closed)

This MR was created by Duo in Session 1099138

Changes

  • Hide "New agent" and "New flow" buttons when user is not signed in
  • Hide create forms for agents and flows for unauthenticated users
  • Improve user experience by preventing access to functionality that requires authentication

How to test

  1. Enable the feature flag: echo "Feature.enable(:global_ai_catalog)" | rails c
  2. Visit http://gdk.test:3000/explore/ai-catalog/agents
  3. Visit http://gdk.test:3000/explore/ai-catalog/agents/new
  4. Create an agent, go back to the index page and click on the "..." dropdown to click on 'edit'. Save the ID or edit URL somewhere.
  5. Visit http://gdk.test:3000/explore/ai-catalog/flows
  6. Visit http://gdk.test:3000/explore/ai-catalog/flows/new
  7. Create a flow, go back to the index page and click on the "..." dropdown to click on 'edit'. Save the ID or edit URL somewhere.
  8. Now, open http://gdk.test:3000/explore/ai-catalog/ in an incognito tab, when being logged out
  9. The buttons 'new agent' and 'new flow' should not be visible anymore
  10. Visit http://gdk.test:3000/explore/ai-catalog/agents/new. It redirects back to index page
  11. Visit http://gdk.test:3000/explore/ai-catalog/flows/new. It redirects back to index page
  12. Visit http://gdk.test:3000/explore/ai-catalog/agents/ID/edit. It redirects back to index page
  13. Visit http://gdk.test:3000/explore/ai-catalog/flows/ID/edit. It redirects back to index page
Edited by Vanessa Otto

Merge request reports

Loading