determine original owner of template to prevent stealing it when the intent is to copy it

This commit is contained in:
2026-02-23 06:37:51 -05:00
parent d23a19a3eb
commit ec8efec61e

View File

@@ -162,6 +162,12 @@ if ($usertemplateid) {
$loadtemplate = NULL;
}
// determine original owner of template
$orig_owner=dblookup($db, "notetemplates","templateid","tech",$templateid);
if ($efftechid != NULL && $efftechid != $orig_owner) {
$operation="add";
}
if ($operation == "add") {
if ($submit) {
if ($note) {