Allow duplication only for maintainers and above
What does this MR do and why?
Currently, users with less than the maintainer role can duplicate agents and flows within projects. Our design is to allow only maintainers and above to duplicate agents and flows, as this is the same behaviour pattern as creating agents and flows.
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- In the GDK, as administrator, create an agent or a flow and enable it in a group and project
- Navigate to a project and notice that the "Duplicate" option is present in the action items menu on the right side of the screen for the agent or flow you created
- Navigate to
http://gdk.test:3000/admin/users/and "Impersonate" a user that has only the developer role - Navigate to the project's agent or flow screen and notice that you can no longer see the "Duplicate" option (or any option at all) in the action items menu
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #582834