feat(club): enhance club access routes and permissions handling

- Reorganized club-related routes for better clarity and access control, ensuring specific routes are prioritized.
- Updated the store to reset user-specific permissions upon token setting, improving security.
- Modified the ClubView component to handle access checks more effectively, allowing for fallback club data when access is denied.
This commit is contained in:
Torsten Schulz (local)
2026-02-04 13:28:02 +01:00
parent 9cb9ff511c
commit 5b0a3baa21
3 changed files with 16 additions and 4 deletions

View File

@@ -7,11 +7,12 @@ const router = express.Router();
router.get('/', authenticate, getClubs);
router.post('/', authenticate, addClub);
router.put('/:clubid/settings', authenticate, updateClubSettings);
router.get('/:clubid', authenticate, getClub);
// Spezifische Routen VOR generischem /:clubid
router.get('/request/:clubid', authenticate, requestClubAccess);
router.get('/pending/:clubid', authenticate, authorize('approvals', 'read'), getPendingApprovals);
router.post('/approve', authenticate, authorize('approvals', 'write'), approveClubAccess);
router.post('/reject', authenticate, authorize('approvals', 'write'), rejectClubAccess);
router.post('/reject', authenticate, authorize('approvals', 'write'), rejectClubAccess);
router.put('/:clubid/settings', authenticate, updateClubSettings);
router.get('/:clubid', authenticate, getClub);
export default router;