summaryrefslogtreecommitdiff
path: root/fetch.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-29 05:27:41 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-29 05:27:41 -0400
commite64e4e3ec85753dcfcc1a0bfa3c65573e351b0ef (patch)
tree19098ac25875cedaf5271723bc19806cd10f29e8 /fetch.go
parent47cfde452d5638fb7eb418a70ef775c03d25f91c (diff)
Add permission flags
Diffstat (limited to 'fetch.go')
-rw-r--r--fetch.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/fetch.go b/fetch.go
index ecd3ec9ea..e505776cb 100644
--- a/fetch.go
+++ b/fetch.go
@@ -31,6 +31,12 @@ func Fetch(id int32, targetUrl string) []byte {
FetchResId: id,
}
+ if !Perms.Connect {
+ resMsg.Error = "Permission to connect denied."
+ PubMsg("fetch", resMsg)
+ return
+ }
+
resp, err := http.Get(targetUrl)
if err != nil {
resMsg.Error = err.Error()