Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WebDevSimplified/course-platform
/ canAccessAdminPages
Function
canAccessAdminPages
src/permissions/general.ts:3–5 ·
view source on GitHub ↗
({ role }: { role: UserRole | undefined })
Source
from the content-addressed store, hash-verified
1
import
{ UserRole } from
"@/drizzle/schema"
2
3
export
function
canAccessAdminPages({ role }: { role: UserRole | undefined }) {
4
return
role ===
"admin"
5
}
Callers
1
AdminLink
Function · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected