@@ -23,66 +23,70 @@ export const SecuritySettingsPageView = ({
23
23
options : options ,
24
24
featureAuditLogEnabled,
25
25
featureBrowserOnlyEnabled,
26
- } : SecuritySettingsPageViewProps ) : JSX . Element => (
27
- < >
28
- < Stack direction = "column" spacing = { 6 } >
29
- < div >
30
- < Header
31
- title = "Security"
32
- description = "Ensure your Coder deployment is secure."
33
- />
26
+ } : SecuritySettingsPageViewProps ) : JSX . Element => {
27
+ const tlsOptions = options . filter ( ( o ) =>
28
+ deploymentGroupHasParent ( o . group , "TLS" ) ,
29
+ )
34
30
35
- < OptionsTable
36
- options = { useDeploymentOptions (
37
- options ,
38
- "SSH Keygen Algorithm" ,
39
- "Secure Auth Cookie" ,
40
- "Disable Owner Workspace Access" ,
41
- ) }
42
- />
43
- </ div >
31
+ return (
32
+ < >
33
+ < Stack direction = "column" spacing = { 6 } >
34
+ < div >
35
+ < Header
36
+ title = "Security"
37
+ description = "Ensure your Coder deployment is secure."
38
+ />
44
39
45
- < div >
46
- < Header
47
- title = "Audit Logging"
48
- secondary
49
- description = "Allow auditors to monitor user operations in your deployment."
50
- docsHref = { docs ( "/admin/audit-logs" ) }
51
- />
40
+ < OptionsTable
41
+ options = { useDeploymentOptions (
42
+ options ,
43
+ "SSH Keygen Algorithm" ,
44
+ "Secure Auth Cookie" ,
45
+ "Disable Owner Workspace Access" ,
46
+ ) }
47
+ />
48
+ </ div >
52
49
53
- < Badges >
54
- { featureAuditLogEnabled ? < EnabledBadge /> : < DisabledBadge /> }
55
- < EnterpriseBadge />
56
- </ Badges >
57
- </ div >
50
+ < div >
51
+ < Header
52
+ title = "Audit Logging"
53
+ secondary
54
+ description = "Allow auditors to monitor user operations in your deployment."
55
+ docsHref = { docs ( "/admin/audit-logs" ) }
56
+ />
58
57
59
- < div >
60
- < Header
61
- title = "Browser Only Connections"
62
- secondary
63
- description = "Block all workspace access via SSH, port forward, and other non-browser connections."
64
- docsHref = { docs ( "/networking#browser-only-connections-enterprise" ) }
65
- />
58
+ < Badges >
59
+ { featureAuditLogEnabled ? < EnabledBadge /> : < DisabledBadge /> }
60
+ < EnterpriseBadge />
61
+ </ Badges >
62
+ </ div >
66
63
67
- < Badges >
68
- { featureBrowserOnlyEnabled ? < EnabledBadge /> : < DisabledBadge /> }
69
- < EnterpriseBadge />
70
- </ Badges >
71
- </ div >
64
+ < div >
65
+ < Header
66
+ title = "Browser Only Connections"
67
+ secondary
68
+ description = "Block all workspace access via SSH, port forward, and other non-browser connections."
69
+ docsHref = { docs ( "/networking#browser-only-connections-enterprise" ) }
70
+ />
72
71
73
- < div >
74
- < Header
75
- title = "TLS"
76
- secondary
77
- description = "Ensure TLS is properly configured for your Coder deployment."
78
- />
72
+ < Badges >
73
+ { featureBrowserOnlyEnabled ? < EnabledBadge /> : < DisabledBadge /> }
74
+ < EnterpriseBadge />
75
+ </ Badges >
76
+ </ div >
79
77
80
- < OptionsTable
81
- options = { options . filter ( ( o ) =>
82
- deploymentGroupHasParent ( o . group , "TLS" ) ,
83
- ) }
84
- />
85
- </ div >
86
- </ Stack >
87
- </ >
88
- )
78
+ { tlsOptions . length > 0 && (
79
+ < div >
80
+ < Header
81
+ title = "TLS"
82
+ secondary
83
+ description = "Ensure TLS is properly configured for your Coder deployment."
84
+ />
85
+
86
+ < OptionsTable options = { tlsOptions } />
87
+ </ div >
88
+ ) }
89
+ </ Stack >
90
+ </ >
91
+ )
92
+ }
0 commit comments