- Issue created by @SirClickALot
- π©πͺGermany jurgenhaas Gottmadingen
It's a permission issue. When a user registers themselves, the ECA model is executed under that user's context. As users are not allowed to assign themselves new roles - for good reasons ;-) - they can't do that under ECA either. But if you enhance your model such that you switch the user context to a permitted account, then it should be working there too.
- π¬π§United Kingdom SirClickALot Somerset
Brilliant, thank you JΓΌrgen β ,
That worked a treat!
- Status changed to Fixed
over 1 year ago 11:44am 30 March 2023 - π©πͺGermany jurgenhaas Gottmadingen
Excellent, thanks for your feedback.
I'm having a similar issue. I use a custom SAML module to check whether a user logging in has the Alpha role. If that user does not have the Alpha role, then it assigns that user the role. I have a use case where some users now require a restricted role. I could update the custom module, but it sounded like ECA could do what I needed. I need to remove the Alpha role from a user upon log in and add the Alpha Restricted role. This does not work. If the user logging in has the administrator role, then it can assign itself the Alpha Restricted role, but a plain Alpha user cannot assign itself the Restricted role - due to permissions as stated by jurgenhaas.
I'm not sure what this means: "But if you enhance your model such that you switch the user context to a permitted account, then it should be working there too." I wonder if someone can offer some more details on what it means to switch the user context?
I am using ECA, ECA CM, ECA UI, ECA User.
- π©πͺGermany jurgenhaas Gottmadingen
@hannakras welcome to ECA. A note before I answer your question: commenting on fixed or closed issues is not recommended. Would be better to start a new one.
As for "switch the user context to a permitted account", there is an ECA action User: switch current account that you can use to process your ECA model (or parts of it) in that different user context.
You may get some ideas on how to build ECA models from the library in the ECA Guide, e.g. https://ecaguide.org/library/use%20case/eca_feature_demo/
@jurgenhaas, thank you for the etiquette tip. Will be sure to do that in future.
And thank you for pointing me in the right direction. I was able to make my workflow work using two actions, Current user: load and User: switch current account.
- Status changed to Fixed
over 1 year ago 4:54pm 21 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.