Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param EntryCrypt $entryCrypt
  * @return Response
  */
 public function destroy($id, EntryCrypt $entryCrypt)
 {
     $model = Share::findOrFail($id);
     $entry = $model->entry;
     if (!$model->delete()) {
         return Response::json(['flash' => 'Unauthorized.'], 403);
     }
     $entryCrypt->removeInvalidShares($entry);
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param EntryCrypt $entryCrypt
  * @return Response
  */
 public function destroy($id, EntryCrypt $entryCrypt)
 {
     $model = UserTeam::findOrFail($id);
     if (!$model->delete()) {
         abort(403);
     }
     $this->getListOfEntries($model)->each(function ($entry) use($entryCrypt) {
         $entryCrypt->removeInvalidShares($entry);
     });
 }
Ejemplo n.º 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param EntryCrypt $entryCrypt
  * @return Response
  */
 public function destroy($id, EntryCrypt $entryCrypt)
 {
     $model = ProjectTeam::findOrFail($id);
     $project = $model->project;
     if (!$model->delete()) {
         abort(403);
     }
     foreach ($project->keys as $key) {
         $entryCrypt->removeInvalidShares($key);
     }
 }