docs(auth): add RBAC explanation to requireRole middleware
Add JSDoc comment explaining Role-Based Access Control (RBAC) middleware functionality for the requireRole() function. Context: Safe documentation change from stress testing cleanup. Reverted problematic changes (.claude/settings.json, BlogPost.model.js) that violated inst_038/inst_064. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
35be6a797d
commit
f5c2706bcb
1 changed files with 4 additions and 0 deletions
|
|
@ -66,6 +66,10 @@ async function authenticateToken(req, res, next) {
|
|||
|
||||
/**
|
||||
* Check if user has required role
|
||||
*
|
||||
* Role-based access control (RBAC) middleware
|
||||
* Verifies that the authenticated user possesses at least one of the required roles
|
||||
* before allowing access to protected routes
|
||||
*/
|
||||
function requireRole(...roles) {
|
||||
return (req, res, next) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue