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

Properly reset capabilities on logout #2116

Merged
merged 1 commit into from
Oct 1, 2019
Merged

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Oct 1, 2019

Description

When logging out, we also reset capabilities in the SET_CAPABILITIES
mutation. To make sure that the cleared capabilities are persisted in
localStorage, we must include the above mutation in the whitelist for
vuex-persist.

See more detailed analysis here: #1882 (comment)

Related Issue

Indirectly related to #1882

Motivation and Context

Proper cleanup on log out and avoid side effects with public pages like public links.

How Has This Been Tested?

Login then log out. Then check local storage in the browser console, key "phoenixState" and in the JSON look at "user.capabilities" and "user.versions".
Before the fix, logging out would leave the values there.
After the fix, those arrays are properly cleared.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

When logging out, we also reset capabilities in the SET_CAPABILITIES
mutation. To make sure that the cleared capabilities are persisted in
localStorage, we must include the above mutation in the whitelist for
vuex-persist.
@PVince81 PVince81 added the Status:Needs-Review Needs review from a maintainer label Oct 1, 2019
@PVince81 PVince81 added this to the Milestone 1: Phoenix for users milestone Oct 1, 2019
@PVince81 PVince81 self-assigned this Oct 1, 2019
@ownclouders
Copy link
Contributor

💥 Acceptance tests webUITrashbin failed. Please find the screenshots inside ...

https://drone.owncloud.com/owncloud/phoenix/5379/

20191001-125739-182.png
20191001-125755-148.png

Copy link
Contributor

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

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

👍

@LukasHirt LukasHirt merged commit 3f0ca95 into master Oct 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the bugfix/logout-clear-caps branch October 1, 2019 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants