From f92fcb53ca78cc8822962e676b0db117e1a08aa5 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 4 Dec 2016 13:51:58 +0100 Subject: Add CRUD for site credentials --- src/Wallabag/CoreBundle/Entity/SiteCredential.php | 197 ++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Entity/SiteCredential.php (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php new file mode 100644 index 00000000..85ee07d4 --- /dev/null +++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php @@ -0,0 +1,197 @@ +user = $user; + } + + /** + * Get id. + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Set host. + * + * @param string $host + * + * @return SiteCredential + */ + public function setHost($host) + { + $this->host = $host; + + return $this; + } + + /** + * Get host. + * + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Set username. + * + * @param string $username + * + * @return SiteCredential + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Get username. + * + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Set password. + * + * @param string $password + * + * @return SiteCredential + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + /** + * Get password. + * + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Set createdAt. + * + * @param \DateTime $createdAt + * + * @return SiteCredential + */ + public function setCreatedAt($createdAt) + { + $this->createdAt = $createdAt; + + return $this; + } + + /** + * Get createdAt. + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->createdAt; + } + + /** + * @return User + */ + public function getUser() + { + return $this->user; + } + + /** + * @ORM\PrePersist + */ + public function timestamps() + { + if (is_null($this->createdAt)) { + $this->createdAt = new \DateTime(); + } + } +} -- cgit v1.2.3 From 906424c1b6fd884bf2081bfe6dd0b1f9651c2801 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 11 Jun 2017 23:05:19 +0200 Subject: Crypt site credential password --- src/Wallabag/CoreBundle/Entity/SiteCredential.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php index 85ee07d4..732d9506 100644 --- a/src/Wallabag/CoreBundle/Entity/SiteCredential.php +++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php @@ -46,8 +46,7 @@ class SiteCredential * @var string * * @Assert\NotBlank() - * @Assert\Length(max=255) - * @ORM\Column(name="password", type="string", length=255) + * @ORM\Column(name="password", type="text") */ private $password; -- cgit v1.2.3 From bead8b42da4f17238dc0d5e0f90184b224ec5df7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 14 Jun 2017 15:02:34 +0200 Subject: Fix reviews Encrypt username too Redirect to list after saving credentials Fix typos Signed-off-by: Thomas Citharel --- src/Wallabag/CoreBundle/Entity/SiteCredential.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity') diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php index 732d9506..58075e92 100644 --- a/src/Wallabag/CoreBundle/Entity/SiteCredential.php +++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php @@ -37,8 +37,7 @@ class SiteCredential * @var string * * @Assert\NotBlank() - * @Assert\Length(max=255) - * @ORM\Column(name="username", type="string", length=255) + * @ORM\Column(name="username", type="text") */ private $username; -- cgit v1.2.3