mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 10:23:46 +02:00
Fix front and backend views with new service variable setups
This commit is contained in:
@@ -52,6 +52,36 @@ class ServerVariable extends Model
|
||||
'variable_id' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if variable is viewable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanViewAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_viewable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if variable is editable by users.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUserCanEditAttribute()
|
||||
{
|
||||
return (bool) $this->variable->user_editable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if variable is required.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getRequiredAttribute()
|
||||
{
|
||||
return $this->variable->required;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about a given variables parent.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user