-
Notifications
You must be signed in to change notification settings - Fork 0
FOLLOW-UP: Cache user role per WebSocket connection (from PR #273) #274
Copy link
Copy link
Open
Labels
follow-upFollow-up task from PR reviewFollow-up task from PR reviewfrom-reviewIssue originated from PR reviewIssue originated from PR review
Description
Context
This follow-up task was identified during the review of PR #273.
Source PR: #273
PR Title: feat: add authorization / RBAC system (Roadmap 2.3)
Suggested by: @claude[bot]
Task Description
The generated handler calls getUserRole() (which does GetUserByID()) on every Edit, Update, RequestDelete, and ConfirmDelete action. Since LiveTemplate uses long-lived WebSocket connections and roles change infrequently, the role should be cached per connection lifetime.
Options:
- Cache the role in the controller state after first load
- Store role in LiveTemplate session context during Mount
- Use
ctx.UserID()+ in-memory LRU cache with short TTL
This issue was automatically created by prmonitor from PR review comments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
follow-upFollow-up task from PR reviewFollow-up task from PR reviewfrom-reviewIssue originated from PR reviewIssue originated from PR review