B #6315: Fix remove of restricted vector attributes (#2731)

This commit is contained in:
Pavel Czerný authored and GitHub committed 2023-09-18 16:17:59 +02:00
1 parent f5d6f11730
commit 534823e7f1
14 files changed
+29 -27

No files matched your search

+3 -2
View File
@@ -278,7 +278,7 @@ int PoolObjectSQL::replace_template(
if (obj_template)
{
if ( keep_restricted &&
new_tmpl->check_restricted(ra, obj_template.get()) )
new_tmpl->check_restricted(ra, obj_template.get(), false) )
{
error = "Tried to change restricted attribute: " + ra;
@@ -339,11 +339,12 @@ int PoolObjectSQL::append_template(
if ( obj_template )
{
if (keep_restricted &&
new_tmpl->check_restricted(rname, obj_template.get()))
new_tmpl->check_restricted(rname, obj_template.get(), true))
{
error ="User Template includes a restricted attribute " + rname;
return -1;
}
old_tmpl = std::make_unique<Template>(*obj_template);
obj_template->merge(new_tmpl.get());
}
else