Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/alan2207/bulletproof-react
/ requireAdmin
Function
requireAdmin
apps/nextjs-app/src/testing/mocks/utils.ts:106–110 ·
view source on GitHub ↗
(user: any)
Source
from the content-addressed store, hash-verified
104
}
105
106
export
function
requireAdmin(user: any) {
107
if
(user.role !==
'ADMIN'
) {
108
throw Error(
'Unauthorized'
);
109
}
110
}
Callers
2
discussions.ts
File · 0.90
users.ts
File · 0.90
Calls
1
Error
Function · 0.50
Tested by
no test coverage detected