suppressGetenvAccess method
Suppresses System Environment Access
Determines whether system environment access (via getSystemEnvironment)
should be disabled. This is controlled by the
IGNORE_GETENV_PROPERTY_NAME flag, retrieved using JetLeafProperties
.
Returns
true
if system environment access is disabled.false
if system environment variables should be accessible.
Example
if (suppressGetenvAccess()) {
print('System environment access suppressed.');
}
Notes
- When suppressed, getSystemEnvironment always returns an empty map.
- Useful for security-sensitive contexts where environment access must be restricted.
Implementation
@protected
bool suppressGetenvAccess() => getPropertyAs<bool>(IGNORE_GETENV_PROPERTY_NAME, Class.of<bool>()) ?? false;