mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
Teams in its pre-Workspaces form is being paused while the feature is redesigned as a user-grouping primitive within the new Workspaces architecture. The original Teams data model had no workspace-awareness and was effectively non-functional after Phase 2.2 (every route migrated away from team_id), but the UI remained reachable and allowed users to accumulate orphan data while believing they were configuring access control. Hide the Teams sidebar nav entry to prevent new entries to the UI. /api/teams now returns 503 Service Unavailable with a 'feature redesign in progress' message. Existing teams/team_members/team_invites table data is preserved indefinitely for forward migration to the future teams design. Bonus: requireAuth middleware fires before the catch-all so unauthenticated callers see the standard 401 instead of the 503 redesign message - avoids exposing the 'feature being redesigned' signal to unauthenticated probes or fingerprint scanners.
27 lines
1.2 KiB
JavaScript
27 lines
1.2 KiB
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
|
|
// Teams API temporarily disabled while the feature is redesigned as a
|
|
// user-grouping primitive within the new Workspaces architecture. The
|
|
// original Teams data model had no workspace-awareness and was effectively
|
|
// non-functional after Phase 2.2 (every resource route migrated away from
|
|
// team_id), but the UI remained reachable and let users accumulate orphan
|
|
// data while believing they were configuring access control.
|
|
//
|
|
// All inbound methods now return 503 Service Unavailable with a message
|
|
// pointing at the in-progress redesign. The teams / team_members /
|
|
// team_invites tables are preserved indefinitely for forward migration
|
|
// to the future Teams design - do NOT drop them.
|
|
//
|
|
// When the new design lands, this router file is the replacement point:
|
|
// drop in the new handlers and remove the catch-all below.
|
|
router.all('*', (req, res) => {
|
|
res.status(503).json({
|
|
error: 'Teams temporarily unavailable',
|
|
message: 'The Teams feature is being redesigned to work within the new Workspaces system. It will return in a future release. Existing team data is preserved and will be migrated forward.',
|
|
reason: 'feature_redesign_in_progress',
|
|
});
|
|
});
|
|
|
|
module.exports = router;
|