Skip to content

Commit

Permalink
fix(formanswer): avoid loop of purge permission check
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Feb 5, 2019
1 parent 8f4111f commit 93a7f84
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ public static function canPurge() {
}

public function canPurgeItem() {
$form = new PluginFormcreatorForm();
$formFk = PluginFormcreatorForm::getForeignKeyField();
$form->getFromDB($this->fields[$formFk]);
return $form->canPurgeItem();
return Session::haveRight('entity', UPDATE);
}

/**
Expand Down

0 comments on commit 93a7f84

Please sign in to comment.