chg: [objects:delete] Support of hard flag in posted body. Fix #6689

pull/6916/head
mokaddem 2021-01-22 10:26:14 +01:00
parent 8131ad86e3
commit 80fd61b75b
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -808,6 +808,9 @@ class ObjectsController extends AppController
$this->MispObject->Event->insertLock($this->Auth->user(), $eventId);
}
if ($this->request->is('post') || $this->request->is('delete')) {
if (!empty($this->request->data['hard'])) {
$hard = true;
}
if ($this->__delete($object['Object']['id'], $hard)) {
$message = 'Object deleted.';
if ($this->request->is('ajax')) {