FlowFuse / FlowFuse/flowfuse

FE Architecture GBAC-03: Component-to-Guard Migration

Open
#6,593 0 comments 0 reactions 0 assignees View on GitHub
story
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Description

This task represents the final phase of the GBAC rollout.

We will systematically audit the entire application, moving from the most granular leaf routes up to the top-level parents, stripping out manual security logic and replacing it with the declarative meta.guards pattern.

With the GBAC scaffolding and global guards in place, we now need to migrate our route-specific security logic. Currently, many components handle their own access control (e.g., checking user roles in onMounted and manually calling router.push). This creates "Flash of Unauthorized Content" (FOUC) and distributes security logic across the codebase.

We will use a bottom-up approach:
1.Identify the most deeply nested routes.
1.Move their security requirements to the route meta.
1.Remove the logic from the component.
1. Move up one level to the parent route and repeat.

Because we are shifting the location of the logic (from Component to Router) rather than changing the business rules themselves, our existing E2E test suite becomes our most valuable asset.

These tests are "blind" to implementation details—they only care if a user can or cannot see a specific page. By running the full suite after each migration step, we gain immediate confidence that the security boundaries remain intact, even as the underlying architecture is completely swapped out.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.