Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When user changes location, set the userSession.token value based on cookie #6079

Merged
merged 13 commits into from
Aug 27, 2024

Conversation

tiberiuichim
Copy link
Contributor

@tiberiuichim tiberiuichim commented Jun 7, 2024

A fix for #6071

The problem is like this: the userSession.token is written in 2 cases:

With this change, when the user performs a GET_CONTENT (perhaps it should be a route change?), we trigger a fake login/logout success action, to mutate the userSession.token in the store.


📚 Documentation preview 📚: https://volto--6079.org.readthedocs.build/

Copy link

netlify bot commented Jun 7, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 20b9268
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/6662b1f5fd55eb0008e5f936

Copy link

netlify bot commented Jun 7, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 4c6d169
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66ce4d7f2053990008f15644

@tiberiuichim tiberiuichim changed the title When fetching content with GET_CONTENT, set the userSession.token value based on cookie When user changes location, set the userSession.token value based on cookie Jun 7, 2024
@sneridagh
Copy link
Member

@tiberiuichim I assume this is WIP still, right? Ping me when you are done with it.

@stevepiercy
Copy link
Collaborator

@tiberiuichim is this ready to merge? CI is all green.

packages/volto/src/middleware/api.js Outdated Show resolved Hide resolved
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works as expected.

@davisagli davisagli merged commit 64b7d04 into main Aug 27, 2024
70 checks passed
@davisagli davisagli deleted the visibility_login_sensor branch August 27, 2024 22:13
sneridagh added a commit that referenced this pull request Sep 14, 2024
* main: (97 commits)
  Release 18.0.0-alpha.43
  Release @plone/slate 18.0.0-alpha.18
  Release @plone/client 1.0.0-alpha.17
  Added a notice in the upgrade guide for CookiePlone as the recommended way for generating projects and add-on boilerplate (#6286)
  Fix typo in Changelog for #6285 (#6287)
  Update to Volto 6.0.13 (#6285)
  Fix order component (#6284)
  Remove dangling `.only` in Cypress test (#6282)
  Empty GridBlocks will not be rendered in 'View' (#6280)
  Refactor Content upload modal  (#5047)
  Passes the `user` to the `restricted` function of the block settings (#6271)
  Refactored SelectMetadataField.jsx to functional component (#5570)
  Remove "Generate tabs for items other than folders" field from navigation control panel (#6278)
  Refactor DatetimeWidget (#6213)
  Added make i18n to volto (#6274)
  Place the actions-storybook in correct folder (#6275)
  Refactor ReferenceWidget (#5093)
  Fix error in SortOn component when there is no sort selected. (#6273)
  When user changes location, set the userSession.token value based on cookie (#6079)
  Trivial MyST syntax enhancement
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants