FlowFuse / FlowFuse/flowfuse

Redirect unauthorized users from instance creation and align /check-name access checks

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

Description

### Description

**Context**
Users without permission to create an instance in any application can open the instance creation form by accessing the create URL. They should be blocked and redirected.

Related gap: `/check-name` validates only team access and ignores application context, so users with application create rights but without team rights get false negatives on name availability.

**Acceptance criteria**
- Unauthorized users (no create permission in the targeted application) cannot access the instance creation form.
- Direct navigation to the form redirects to a safe page with a clear authorization message.
- API and UI guardrails are consistent: front end hides/blocks entry points based on effective permissions.
- `/check-name` enforces both application and team context:
- Users with application create rights but lacking team rights receive an authorization error, not a misleading “name unavailable”.
- Users with proper application + team rights receive accurate availability results.
- Authorization outcomes are covered by tests: redirect behavior, API 403s, and positive/negative `/check-name` cases.

### Epic/Story

_No response_

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Research direction

Trace the instance creation URL and form entry points, then inspect the /check-name endpoint and its application and team permission checks. Review the existing authorization tests first. Done means unauthorized users are redirected with a clear message, APIs return 403s, UI guardrails agree, and positive and negative /check-name cases are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, authorization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.