Allow users to edit existing documents, even if they belong in categories they don't have permission to write in anymore

This commit is contained in:
Kijin Sung 2025-10-24 17:51:33 +09:00
parent b119578209
commit e676949669
5 changed files with 77 additions and 82 deletions

View file

@ -756,7 +756,7 @@ class DocumentController extends Document
{
if (!$category_list[$obj->category_srl]->grant)
{
return new BaseObject(-1, 'msg_not_permitted');
return new BaseObject(-1, 'document.msg_category_not_permitted');
}
}
else
@ -764,6 +764,10 @@ class DocumentController extends Document
$obj->category_srl = 0;
}
}
else
{
$obj->category_srl = 0;
}
}
// Set the read counts and update order.
@ -1116,7 +1120,7 @@ class DocumentController extends Document
{
if (!$category_list[$obj->category_srl]->grant)
{
return new BaseObject(-1, 'msg_not_permitted');
return new BaseObject(-1, 'document.msg_category_not_permitted');
}
}
else
@ -1124,6 +1128,10 @@ class DocumentController extends Document
$obj->category_srl = 0;
}
}
else
{
$obj->category_srl = 0;
}
}
// Hash the password if it exists