Function: selectWidgets()
selectWidgets(
widgets,ctx):WidgetDef[]
Defined in: src/server/dashboard/select.ts:30
Pure: the ordered set of widgets the given admin may see. A widget renders when (its domain is
permitted OR it has been explicitly granted to the role), AND it is not owner-only-for-staff, AND it
has not been hidden for the role. Sorted by domain band, then primary-before-secondary. Fails closed:
an unassigned staffer with no grants only has overview, so only overview widgets come back.
Parameters
widgets
readonly WidgetDef[]