Bloccs.Web.Access (bloccs_web v0.1.0)

Copy Markdown View Source

The default Bloccs.Web.Resolver — the free, open baseline.

Every user is anonymous, has full read access, and sees every feature. This is also the central place panels ask "is this feature on?" via enabled?/2, so a future licensed resolver only has to narrow resolve_features/1 while the LiveView code stays unchanged.

Summary

Types

Features the dashboard knows how to gate. All on in the free build.

Functions

Every feature the dashboard defines (the upper bound a resolver may grant).

Whether feature is enabled given a resolved feature set.

Types

feature()

@type feature() ::
  :networks | :topology | :messages | :metrics | :coverage | :trace_export

Features the dashboard knows how to gate. All on in the free build.

Functions

all_features()

@spec all_features() :: [feature()]

Every feature the dashboard defines (the upper bound a resolver may grant).

enabled?(feature, features)

@spec enabled?(feature(), :all | [feature()]) :: boolean()

Whether feature is enabled given a resolved feature set.

:all (the free baseline) enables everything; a list enables only its members. Panels call this and render a "Pro" lock when it returns false.