Thank you for your help Alex, I really appreciate you!
Seems to work just fine after updating to strapi.container.get
.
Thought I would ping <@752476861904191499>, <@729581409446133801> and <@711514413982548032> as this workaround works perfectly for our use-case.
I tested the following:
- Non super-admin creating/inviting a new user with the super-admin role
- Non super-admin creating/inviting a new user without the super-admin role
- Super-admin creating/inviting a new user with the super-admin role
- Super-admin creating/inviting a new user without the super-admin role
- Edit/update actions for all criteria above - both adding and removing super-admin roles from a normal and admin user
- Deletion actions (one and many) for all criteria above - deleting users with and without super-admin, as both a normal user and admin user
I included comments, so that everyone can use this, regardless of experience.
Note: deleteOne
never seems to trigger, instead deleteMany
is called with 1 id when deleting a single/individual user through the dashboard - logic is still added to deleteOne
for (potential) user API calls