added configurable permission system (#424)
This commit is contained in:
@@ -69,6 +69,11 @@ class UserPreference
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $enabled = true;
|
||||
|
||||
/**
|
||||
* @var Constraint[]
|
||||
*/
|
||||
@@ -181,6 +186,25 @@ class UserPreference
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $enabled
|
||||
* @return UserPreference
|
||||
*/
|
||||
public function setEnabled(bool $enabled)
|
||||
{
|
||||
$this->enabled = $enabled;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the constraints which are used for validation of the value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user