/**
  * This assertion should receive the actual Submission objects.
  *
  * @param Zend_Acl $acl
  * @param Zend_Acl_Role_Interface $user
  * @param Zend_Acl_Resource_Interface $model
  * @param $privilege
  * @return bool
  */
 public function assert(Zend_Acl $acl, Zend_Acl_Role_Interface $user = null, Zend_Acl_Resource_Interface $model = null, $privilege = null)
 {
     if ($user) {
         $submissions = $user->getMySubmissions();
     } else {
         return false;
     }
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $param = $request->getParam('id') ? $request->getParam('id') : $request->getParam('submission_id');
     if ($request->getParam('action') == 'new') {
         return true;
     }
     $submission = $model->getSubmissionById($param);
     // perform check
     if ($param !== null && $submission->isBeforeEditDeadline() && in_array((int) $param, array_keys($submissions), true)) {
         return true;
     } else {
         return false;
     }
 }