CIA Compliance Manager API Documentation - v1.0.1
    Preparing search index...

    Function useSecurityLevelState

    • Custom hook for managing CIA triad security levels

      Provides unified state management for security officers to configure organizational security posture across all three CIA components. This centralization ensures consistent security level handling and simplifies state management across the application. 🔒

      Extracts common security level state management pattern found in 8+ widgets, reducing code duplication by ~20% and ensuring consistent behavior. Uses React hooks best practices with proper memoization for optimal performance.

      Parameters

      • OptionalinitialLevels: Partial<SecurityLevelState>

        Initial security levels (defaults to 'Moderate' for all components)

      Returns UseSecurityLevelStateReturn

      Security level state and update functions

      // Basic usage with defaults
      const { levels, setLevel, getLevel } = useSecurityLevelState();

      // Update a level
      setLevel('availability', 'High');

      // Get a level
      const currentLevel = getLevel('integrity');

      // Initialize with custom levels
      const { levels } = useSecurityLevelState({
      availability: 'High',
      integrity: 'Moderate',
      confidentiality: 'Very High'
      });

      // Reset all levels
      resetLevels('Low');