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

Store platform settings, teamMembership and team store values in localStorage #4507

Merged
merged 10 commits into from
Sep 27, 2024

Conversation

cstns
Copy link
Contributor

@cstns cstns commented Sep 18, 2024

Description

Syncing the account store's features in localStorage and teamMembership and team keys in sessionStorage.

Since the creation of the related bug, a new guard has been added in the assets tab on the mounted lifecycle hook that redirects unauthorized users (hasAMinimumTeamRoleOf('member')) to the instance overview page.

Given the async nature of the team, teamMembership and settings api calls which returns the data required to validate permissions, I'm automatically redirected to the instance overview page when accessing the immersive editor assets page.

If the guard were to be removed, the bug can be replicated.

I had to get a little bit creative with the route guard and data loading.

Related Issue(s)

closes #4459

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns requested a review from Steve-Mcl September 18, 2024 08:30
@cstns cstns self-assigned this Sep 18, 2024
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.30%. Comparing base (4353c82) to head (423553e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4507   +/-   ##
=======================================
  Coverage   78.30%   78.30%           
=======================================
  Files         302      302           
  Lines       14355    14355           
  Branches     3263     3263           
=======================================
  Hits        11240    11240           
  Misses       3115     3115           
Flag Coverage Δ
backend 78.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

frontend/src/pages/instance/Assets.vue Outdated Show resolved Hide resolved
frontend/src/pages/instance/Assets.vue Outdated Show resolved Hide resolved
frontend/src/pages/instance/Editor/index.vue Outdated Show resolved Hide resolved
…immersive-editor-first-page-load

# Conflicts:
#	frontend/src/mixins/Features.js
#	frontend/src/pages/instance/Assets.vue
@cstns
Copy link
Contributor Author

cstns commented Sep 27, 2024

follow up to use the local copy of roles #4578

@cstns cstns merged commit d3dd548 into main Sep 27, 2024
14 checks passed
@cstns cstns deleted the 4459_empty-assets-on-immersive-editor-first-page-load branch September 27, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigating directly to immersive view, assets are empty
2 participants