func AssertCallerIsParentPath
AssertCallerIsParentPath panics if IsCallerParentPath returns false.
Package nestedpkg provides helpers for package-path based access control. It is useful for upgrade patterns relying o...
Package nestedpkg provides helpers for package-path based access control. It is useful for upgrade patterns relying on namespaces.
SECURITY: every exported helper takes `rlm realm` and reads both `rlm.PkgPath()` and `rlm.Previous().PkgPath()` to make an authorization decision. To close Class-2 designation forgery (a hostile realm stashes a captured realm value and passes it back to spoof identity), every helper gates on `rlm.IsCurrent()` first. The Is* predicates return false on stale rlm (fail-closed); the Assert* helpers panic. See docs/resources/gno-security.md.
AssertCallerIsParentPath panics if IsCallerParentPath returns false.
AssertCallerIsSubPath panics if IsCallerSubPath returns false.
AssertIsSameNamespace panics if IsSameNamespace returns false.
IsCallerParentPath checks if the caller realm is located in a parent location of the current realm.
IsCallerSubPath checks if the caller realm is located in a subfolder of the current realm.
IsSameNamespace checks if the caller realm and the current realm are in the same namespace.