I would like to dynamically populate the values for an enumeration field when creating a new instance of a collection type based on the user who is logged in. Specifically, based on the admin user who is creating the instance, I need to be able to provide a drop down of values that allows them to choose. But the values in the drop down would be different based on the role of the user.
I was able to figure out, how to populate values dynamically in the enumeration, but I can’t seem to find any way of fetching the current user in the component.
Any help is much appreciated. Thanks!
- Strapi Version: 3.5.4
- Operating System: MacOS
- Database: PostgreSQL
- Node Version: node v12.19.0
- NPM Version: 6.14.8
- Yarn Version: 1.22.10