aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-07-29 19:42:50 -0700
committerDustin Mierau <dustin@mierau.me>2024-07-29 19:42:50 -0700
commite30714682fc038995ad6deb64ac3205278b7d020 (patch)
tree49045fffeb46e10275c0a0ec32bee9b0c14f7813 /Hotline
parentd966142a67ea99c16c71b1c791478474d37b80fd (diff)
Enable/disable upload and download buttons based on current user access.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/macOS/FilesView.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/Hotline/macOS/FilesView.swift b/Hotline/macOS/FilesView.swift
index a4013ad..2befa18 100644
--- a/Hotline/macOS/FilesView.swift
+++ b/Hotline/macOS/FilesView.swift
@@ -414,6 +414,7 @@ struct FilesView: View {
Label("Upload", systemImage: "arrow.up")
}
.help("Upload")
+ .disabled(model.access?.contains(.canUploadFiles) != true)
}
ToolbarItem(placement: .primaryAction) {
@@ -425,7 +426,7 @@ struct FilesView: View {
Label("Download", systemImage: "arrow.down")
}
.help("Download")
- .disabled(selection == nil || selection?.isFolder == true)
+ .disabled(selection == nil || selection?.isFolder == true || model.access?.contains(.canDownloadFiles) != true)
}
}
}