Merge branch '261-no-access-when-setting-privacy-policy' into 'master'
Resolve "No access when setting privacy policy" Closes #261 See merge request jankstudio/resq!306
This commit is contained in:
commit
a71b1a36fd
2 changed files with 29 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ access_keys:
|
|||
label: Cancel
|
||||
- id: warranty.delete
|
||||
label: Delete
|
||||
- id: warranty.set.privacypolicy
|
||||
label: Set Privacy Policy
|
||||
- id: batterybrand
|
||||
label: Battery Brand Access
|
||||
acls:
|
||||
|
|
|
|||
|
|
@ -127,6 +127,13 @@ class Warranty
|
|||
*/
|
||||
protected $flag_activated;
|
||||
|
||||
// privacy policy
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="PrivacyPolicy", inversedBy="warranties")
|
||||
* @ORM\JoinColumn(name="warranty_privacy_policy", referencedColumnName="id", nullable=true)
|
||||
*/
|
||||
protected $privacy_policy;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->date_create = new DateTime();
|
||||
|
|
@ -366,4 +373,24 @@ class Warranty
|
|||
{
|
||||
return $this->flag_activated;
|
||||
}
|
||||
|
||||
public function hasPrivacyPolicy()
|
||||
{
|
||||
if ($this->privacy_policy == null)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function setPrivacyPolicy($privacy_policy)
|
||||
{
|
||||
$this->privacy_policy = $privacy_policy;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPrivacyPolicy()
|
||||
{
|
||||
return $this->privacy_policy;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue