Rustelo/resources/nickel/features/contracts.ncl

71 lines
2.6 KiB
Text
Raw Normal View History

2026-07-18 20:16:16 +01:00
# Feature flag configuration contracts
#
# Mirrors rustelo_server::config::FeatureConfig and its sub-structs.
# These flags enable/disable runtime behaviour — they are distinct from
# Cargo features which control compile-time code inclusion.
{
AuthFeatures = {
enabled | Bool | default = true,
jwt | Bool | default = true,
oauth | Bool | default = false,
two_factor | Bool | default = false,
sessions | Bool | default = true,
password_reset | Bool | default = true,
email_verification | Bool | default = false,
},
RbacFeatures = {
enabled | Bool | default = false,
database_access | Bool | default = false,
file_access | Bool | default = false,
content_access | Bool | default = false,
api_access | Bool | default = false,
categories | Bool | default = false,
tags | Bool | default = false,
caching | Bool | default = false,
audit_logging | Bool | default = false,
toml_config | Bool | default = false,
hierarchical_permissions | Bool | default = false,
dynamic_rules | Bool | default = false,
},
ContentFeatures = {
enabled | Bool | default = true,
markdown | Bool | default = true,
syntax_highlighting | Bool | default = false,
file_uploads | Bool | default = true,
versioning | Bool | default = false,
scheduling | Bool | default = false,
seo | Bool | default = true,
},
SecurityFeatures = {
csrf | Bool | default = true,
security_headers | Bool | default = true,
rate_limiting | Bool | default = true,
input_sanitization | Bool | default = true,
sql_injection_protection | Bool | default = true,
xss_protection | Bool | default = true,
content_security_policy | Bool | default = true,
},
PerformanceFeatures = {
response_caching | Bool | default = true,
query_caching | Bool | default = true,
compression | Bool | default = true,
connection_pooling | Bool | default = true,
lazy_loading | Bool | default = false,
background_tasks | Bool | default = true,
},
FeatureConfig = {
auth | AuthFeatures,
rbac | RbacFeatures,
content | ContentFeatures,
security | SecurityFeatures,
performance | PerformanceFeatures,
custom | { _ : Bool } | default = {},
},
}