Passes the `user` to the `restricted` function of the block settings
The restricted function is called inside a useMemo. So we can't call useSelector on it. To work around this, we get the user before useMemo and pass it to the restricted function.
fixes #6264
Deploy Preview for plone-components canceled.
| Name | Link |
|---|---|
| Latest commit | e96e6b5c56c68f89ec09882ded0ad45ce9ba8515 |
| Latest deploy log | https://app.netlify.com/sites/plone-components/deploys/66da0f399aed390008590d45 |
Looks good. Could you please also mention user in the docs?
Done
It was missing to do the dispatch in getUser. It may be that the user is not in the store yet. I'll see if I can make a PR.
@wesleybl @sneridagh @davisagli Do you think we can have this backported into Volto 17.x.x?
@avoinea we have to finish #6293. I don't see a problem with having that in Volto 17.
@wesleybl @avoinea I think it is backwards compatible and could be backported. If someone prepares the PR I can review it.
@wesleybl As #6293 was merged, maybe we can reiterate now the back-port of this to Volto 17.x :thinking:
As https://github.com/plone/volto/pull/6293 was merged, maybe we can reiterate now the back-port of this to Volto 17.x 🤔
Done in #6375