mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Moar updates.
This commit is contained in:
@@ -5,6 +5,15 @@ namespace Firefly\Storage\Import;
|
||||
|
||||
class EloquentImportRepository implements ImportRepositoryInterface
|
||||
{
|
||||
protected $_user = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_user = \Auth::user();
|
||||
}
|
||||
|
||||
public function findImportComponentMap(\Importmap $map, $oldComponentId)
|
||||
{
|
||||
@@ -26,6 +35,16 @@ class EloquentImportRepository implements ImportRepositoryInterface
|
||||
return \Importmap::find($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \User $user
|
||||
* @return mixed|void
|
||||
*/
|
||||
public function overruleUser(\User $user)
|
||||
{
|
||||
$this->_user = $user;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function store(\Importmap $map, $class, $oldID, $newID)
|
||||
{
|
||||
$entry = new \Importentry;
|
||||
|
@@ -24,4 +24,10 @@ interface ImportRepositoryInterface
|
||||
public function findImportEntry(\Importmap $map, $class, $oldID);
|
||||
|
||||
public function findImportComponentMap(\Importmap $map, $oldComponentId);
|
||||
|
||||
/**
|
||||
* @param \User $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function overruleUser(\User $user);
|
||||
}
|
Reference in New Issue
Block a user