UX: Check permissions before opening upload dialog #1131

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-03-30 19:13:03 +02:00
parent 2ebac920f2
commit 422256122d
4 changed files with 12 additions and 4 deletions

View file

@ -245,7 +245,9 @@ export default {
break;
case "KeyU":
ev.preventDefault();
this.$event.publish("dialog.upload");
if (this.$config.allow("files", "upload") && this.$config.feature("upload")) {
this.$event.publish("dialog.upload");
}
break;
}
},

View file

@ -561,7 +561,9 @@ export default {
break;
case "KeyU":
ev.preventDefault();
this.$event.publish("dialog.upload");
if (this.$config.allow("files", "upload") && this.$config.feature("upload")) {
this.$event.publish("dialog.upload");
}
break;
}
},

View file

@ -330,7 +330,9 @@ export default {
break;
case "KeyU":
ev.preventDefault();
this.$event.publish("dialog.upload");
if (this.$config.allow("files", "upload") && this.$config.feature("upload")) {
this.$event.publish("dialog.upload");
}
break;
}
},

View file

@ -298,7 +298,9 @@ export default {
break;
case "KeyU":
ev.preventDefault();
this.$event.publish("dialog.upload");
if (this.$config.allow("files", "upload") && this.$config.feature("upload")) {
this.$event.publish("dialog.upload");
}
break;
}
},