BeechCMS / @beechcms/core / hasPermission
Function: hasPermission()
hasPermission(
effective,permission,scope):boolean
The single authorization question: may this caller perform permission on scope?
A global grant satisfies any scope. A scoped grant satisfies only its own seed and never GLOBAL_SCOPE — that asymmetry is what stops horizontal escalation.
Parameters
effective
permission
"content:read" | "content:create" | "content:update" | "content:delete" | "manage_users" | "manage_roles" | "view_analytics" | "manage_layout" | "manage_seeds"
scope
string
Returns
boolean