fix/milestone-1-review-findings #24
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/milestone-1-review-findings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses the review-of-review blocker. After moving hooks above the is_admin early return, the unconditional use_resource was firing GET /api/v1/system/version on every non-admin layout mount and burning a backend round-trip the user could not act on. The fix moves the admin check into the use_resource outer closure: the hook still runs unconditionally so per-render ordering stays stable, but the async body short-circuits with Err("not admin") before calling get_version() while the user is not an admin. Reading auth in the outer closure also keeps the resource reactive to auth flips (login, tenant switch). Signed-off-by: nrupard <natrsmith11@gmail.com>