File size: 633 Bytes
6a7089a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package config

// EnabledSensitiveEndpoints returns the names of sensitive endpoint families
// that are currently enabled in the runtime configuration.
func (cfg *RuntimeConfig) EnabledSensitiveEndpoints() []string {
	if cfg == nil {
		return nil
	}

	enabled := make([]string, 0, 5)
	if cfg.AllowEvaluate {
		enabled = append(enabled, "evaluate")
	}
	if cfg.AllowMacro {
		enabled = append(enabled, "macro")
	}
	if cfg.AllowScreencast {
		enabled = append(enabled, "screencast")
	}
	if cfg.AllowDownload {
		enabled = append(enabled, "download")
	}
	if cfg.AllowUpload {
		enabled = append(enabled, "upload")
	}
	return enabled
}