Added edited_by field to credential revisions

This commit is contained in:
Marcos Zuriaga 2016-10-03 19:50:03 +02:00
parent 7cf807de5f
commit f8c86b9ea6
No known key found for this signature in database
GPG key ID: 7D15585354D072FF
3 changed files with 11 additions and 1 deletions

View file

@ -366,6 +366,12 @@
<type>clob</type>
<notnull>true</notnull>
</field>
<field>
<name>edited_by</name>
<type>text</type>
<notnull>true</notnull>
<length>64</length>
</field>
<index>
<name>passman_revision_id_index</name>
<field>

View file

@ -5,7 +5,7 @@
<description>A password manager for Nextcloud</description>
<licence>AGPL</licence>
<author>Sander Brand</author>
<version>1.0.2.19</version>
<version>1.0.2.20</version>
<namespace>Passman</namespace>
<category>other</category>
<website>https://github.com/nextcloud/passman/</website>

View file

@ -26,6 +26,8 @@ use \OCP\AppFramework\Db\Entity;
* @method integer getCreated()
* @method void setCredentialData(string $value)
* @method string getCredentialData()
* @method void setEditedBy(string $value)
* @method string getEditedBy()
*/
class CredentialRevision extends Entity implements \JsonSerializable {
@ -36,6 +38,7 @@ class CredentialRevision extends Entity implements \JsonSerializable {
protected $userId;
protected $created;
protected $credentialData;
protected $editedBy;
public function __construct() {
@ -53,6 +56,7 @@ class CredentialRevision extends Entity implements \JsonSerializable {
'guid' => $this->getGuid(),
'created' => $this->getCreated(),
'credential_data' => unserialize(base64_decode($this->getCredentialData())),
'edited_by' => $this->getEditedBy(),
];
}
}