Remove Firefly III's ability to encrypt data in the database.

This commit is contained in:
James Cole
2019-01-31 19:56:09 +01:00
parent d56bd85328
commit 4307bf3b83
26 changed files with 166 additions and 742 deletions

View File

@@ -93,22 +93,6 @@ class TransactionJournalLink extends Model
return $this->belongsTo(TransactionJournal::class, 'destination_id');
}
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return null|string
*/
public function getCommentAttribute($value): ?string
{
if (null !== $value) {
return app('steam')->tryDecrypt($value);
}
return null;
}
/**
* @codeCoverageIgnore
* @return BelongsTo
@@ -127,23 +111,6 @@ class TransactionJournalLink extends Model
return $this->morphMany(Note::class, 'noteable');
}
/**
* @codeCoverageIgnore
*
* @param $value
*
* @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function setCommentAttribute($value): void
{
if (null !== $value && \strlen($value) > 0) {
$this->attributes['comment'] = Crypt::encrypt($value);
return;
}
$this->attributes['comment'] = null;
}
/**
* @codeCoverageIgnore
* @return BelongsTo