mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
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:
parent
b119578209
commit
e676949669
5 changed files with 77 additions and 82 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue