diff --git a/client/src/components/History/Modals/CopyModal.vue b/client/src/components/History/Modals/CopyModal.vue index fa5a9b180ac3..38c0469d40a7 100644 --- a/client/src/components/History/Modals/CopyModal.vue +++ b/client/src/components/History/Modals/CopyModal.vue @@ -62,7 +62,7 @@ export default { }; }, computed: { - ...mapState(useUserStore, ["isAnonymous"]), + ...mapState(useUserStore, ["currentUser", "isAnonymous"]), title() { return `Copying History: ${this.history.name}`; }, @@ -72,8 +72,11 @@ export default { saveVariant() { return this.loading ? "info" : this.formValid ? "primary" : "secondary"; }, + userOwnsHistory() { + return this.currentUser.id == this.history.user_id; + }, newNameValid() { - if (this.name == this.history.name) { + if (this.userOwnsHistory && this.name == this.history.name) { return null; } return this.name.length > 0;