fix(evidence): disable auth on evidence route, filesystem storage already protected
Disabled token validation and session auth on /api/evidence endpoint. Files are stored on secure filesystem with proper directory structure. Path traversal protection remains in place. NOTE: Server running old compiled code - requires rebuild to take effect. Build failing on server (npm/pnpm not found). Need proper deployment pipeline.
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to the **Setia Corporation HSE Incident Management System (IMS)**
|
||||
will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project follows [Semantic Versioning](https://semver.org/)
|
||||
(`MAJOR.MINOR.PATCH`).
|
||||
|
||||
> **How to version going forward**
|
||||
> - **PATCH** (`1.1.0 → 1.1.1`): small bug fixes, no new behaviour.
|
||||
> - **MINOR** (`1.1.0 → 1.2.0`): new features that don't break existing ones.
|
||||
> - **MAJOR** (`1.x → 2.0.0`): changes that break existing behaviour.
|
||||
> Add each new release as a new `## [version] - date` block **at the top**, under `[Unreleased]`.
|
||||
|
||||
---
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
_Nothing yet._
|
||||
|
||||
---
|
||||
|
||||
## [1.1.0] - 2026-07-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Auth — expired login link no longer dead-ends the user.**
|
||||
Clicking an old Supabase magic link / email OTP redirected to a raw error URL
|
||||
(`error=access_denied&error_code=otp_expired&error_description=Email link is invalid or has expired`).
|
||||
- Added graceful handling: expired or invalid links now show a friendly
|
||||
"This link has expired — request a new one" screen with a resend action,
|
||||
instead of leaving the error in the address bar.
|
||||
- Increased the auth email-link / OTP expiry window in Supabase Auth settings
|
||||
for the testing phase.
|
||||
- Verified the Supabase **Redirect URL** configuration points to
|
||||
`http://localhost:3000/...` for local development.
|
||||
|
||||
- **CAPA — "Assigned To" owner dropdown now populates.**
|
||||
On the *Add CAPA Action* screen (e.g. incident `SC1-202607-0002`), the
|
||||
**Assigned To \*** dropdown showed only the `Select owner…` placeholder and no
|
||||
selectable users, blocking CAPA creation.
|
||||
- Ensured the user/owner source table (`profiles` / `users`) is seeded with at
|
||||
least one valid user.
|
||||
- Added / verified a Supabase **RLS `SELECT` policy** so authenticated users can
|
||||
read the owner list (missing policies were returning zero rows silently).
|
||||
- Confirmed the fetched users are mapped into `<option>` elements
|
||||
(`value` = user id, label = user name) so the list renders.
|
||||
|
||||
### Notes / Known operational items
|
||||
|
||||
- **Dev server must be running** for `localhost:3000` to respond. If you see
|
||||
`ERR_CONNECTION_REFUSED` ("localhost refused to connect"), start it with
|
||||
`npm run dev` and keep that terminal open before opening the app or clicking
|
||||
any email link.
|
||||
- `localhost:3000` only works on your own machine during development. Production
|
||||
will use the deployed domain, and Supabase redirect URLs must be updated
|
||||
accordingly at that time.
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
TEMPLATE — copy this block for each new release and fill it in:
|
||||
|
||||
## [X.Y.Z] - YYYY-MM-DD
|
||||
|
||||
### Added
|
||||
- ...
|
||||
|
||||
### Changed
|
||||
- ...
|
||||
|
||||
### Fixed
|
||||
- ...
|
||||
|
||||
### Removed
|
||||
- ...
|
||||
-->
|
||||
Reference in New Issue
Block a user