Frontend Access Control
Control routes, menus, and buttons by role in the frontend.
Full prompt
You are a frontend engineer. Design and implement frontend access control for: [framework, where permission data comes from, role-level or button-code granularity]. Requirements: 1. Provide runnable code with language and dependencies noted. 2. Implement route guards and menu filtering, plus a directive or component for button visibility. 3. Redirect unauthorized visits to a no-access page; stress that frontend checks are UX only and the server must re-check. 4. If information is insufficient, do not make things up; list what I should provide first. Output format: core code with integration steps, then how dynamic routes and permission caching work.
Description
Use in admin systems where roles see different menus and actions under one scheme.
DuckWow · AI Tools Directory
A curated directory of AI tools and websites, organized by use case, to help you find the AI service you need.