diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-07-29 19:42:50 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-07-29 19:42:50 -0700 |
| commit | e30714682fc038995ad6deb64ac3205278b7d020 (patch) | |
| tree | 49045fffeb46e10275c0a0ec32bee9b0c14f7813 /Hotline | |
| parent | d966142a67ea99c16c71b1c791478474d37b80fd (diff) | |
Enable/disable upload and download buttons based on current user access.
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/macOS/FilesView.swift | 3 |
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) } } } |