aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/pearl.el b/pearl.el
index d984876..38252b1 100644
--- a/pearl.el
+++ b/pearl.el
@@ -3962,7 +3962,11 @@ the id so it can be deleted by hand)."
(message "Cancelled; no local view deleted"))
((not (assoc name pearl-local-views))
(user-error "No local view named %s" name))
- ((not (yes-or-no-p (format "Delete local view %s? " name)))
+ ((progn
+ ;; Refuse a cross-account entry before the confirm or any customViewDelete:
+ ;; deleting under the wrong account could target the wrong remote workspace.
+ (pearl--require-local-view-account name (cdr (assoc name pearl-local-views)))
+ (not (yes-or-no-p (format "Delete local view %s? " name))))
(message "Kept local view %s" name))
(t
(let ((view-id (plist-get (cdr (assoc name pearl-local-views))
@@ -4295,6 +4299,9 @@ the user can re-publish with Replace to reconcile."
(let ((entry (assoc name pearl-local-views)))
(unless entry
(user-error "No local view named %s" name))
+ ;; Refuse a cross-account entry before any customViewCreate/Update: publishing
+ ;; under the wrong account would create the view in the wrong workspace.
+ (pearl--require-local-view-account name (cdr entry))
(let* ((spec (cdr entry))
(filter-plist (plist-get spec :filter))
(existing-view-id (plist-get spec :linear-view-id))