clsStandardPolicyHeaderSettings¶
clsStandardPolicyHeaderSettings is the default implementation of IPolicyHeaderSettings. It resolves the candidate header association types, caches the current user's validated association types, tracks the selected association type, and controls demo and test-information display flags.
Purpose¶
- Provide the standard security-aware settings object used by
PolicyAppManagerandclsStandardPolicyHeaderDataProvider. - Bridge environment-based flags, association-type visibility, and user selection state into one reusable object.
Context¶
- Namespace:
SAIF.Application.Policy.PolicyHeader - Assembly/package:
SAIF.Application.Policy
Public members¶
| Member | Signature | Purpose |
|---|---|---|
New |
Sub New(ByVal inDPI As IDataPortalInfo, ByVal inSecurityPrincipal As clsSecurityPrincipal, Optional ByRef inSelectedAssociationType As IPolicyAssociationType = Nothing) |
Creates the standard header-settings object for a policy portal and principal. |
AssociationTypeTargets |
ReadOnly Property AssociationTypeTargets As IEnumerable(Of IPolicyAssociationType) |
Loads and caches only the association-type code rows flagged IsDefaultPolicyHeaderType, establishing the header selector choices eligible for display. |
ValidatedAssociationTypes |
ReadOnly Property ValidatedAssociationTypes As IEnumerable(Of IPolicyAssociationType) |
Exposes the current principal's cached, resource-authorized association-type subset, which later intersects with association rows before header choices are shown. |
DisplayPolicySelector |
ReadOnly Property DisplayPolicySelector As Boolean |
Keeps the standard header's association-type selector visible for this settings implementation. |
DisplayTotalsItem |
ReadOnly Property DisplayTotalsItem As Boolean |
Suppresses a standalone totals item in the standard header by always returning False. |
IsTestInformationViewable |
ReadOnly Property IsTestInformationViewable As Boolean |
Enables user, database, and clock diagnostics only outside production environments, hiding them from production headers. |
TestInformation |
ReadOnly Property TestInformation As IApplicationTestInformationProvider |
Lazy-creates the diagnostic payload that exposes portal user and database details when test information is allowed. |
IsTotalsSelected |
Property IsTotalsSelected As Boolean |
Reflects PolicyAppManager.IsCombinationTotalsSelected, pushed in during GetPolicyHeaderSettings construction (OP-04), to control whether the header renders combination-totals UI. |
SecurityPrincipal |
ReadOnly Property SecurityPrincipal As clsSecurityPrincipal |
Carries the principal whose memberships drive association-type security, demo-mode state, and diagnostic visibility decisions. |
BackgroundCSSName |
ReadOnly Property BackgroundCSSName As String |
Provides the fixed CSS class token the standard header uses for its background styling. |
SelectedAssociationType |
Property SelectedAssociationType As IPolicyAssociationType |
Tracks the association type driving the current header view; defaults via GetDefaultAssociationType (OP-06) when no selection has been made yet. |
DemoMode |
ReadOnly Property DemoMode As Boolean |
Caches whether the current principal should receive demo-masked header values instead of real identifying text. |
ValidatedUserAssociationTypeSecurity |
ReadOnly Property ValidatedUserAssociationTypeSecurity(ByVal inSecurityPrincipal As clsSecurityPrincipal) As IEnumerable(Of IPolicyAssociationType) |
Reuses or populates the shared per-user cache of validated association types so repeated renders do not recompute the same authorization set. |
Behavioral notes¶
- The class caches per-user validated association types in a
Shareddictionary. - Test-information visibility is derived entirely from the environment service's production flag.
Constraints and usage notes¶
- The standard implementation assumes the caller has already established a valid portal context.
Sources¶
Application\SAIF.Application.Policy\PolicyHeader\clsStandardPolicyHeaderSettings.vb