mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Node and user API routes implemented.
More attempts at the logic for API permissions, most likely will need continued tweaking in the future, but base is there.
This commit is contained in:
@@ -76,6 +76,10 @@ class ServerVariableTransformer extends TransformerAbstract
|
||||
*/
|
||||
public function includeParent(ServerVariable $variable)
|
||||
{
|
||||
return $this->item($variable->variable, new ServiceVariableTransformer, 'variable');
|
||||
if ($this->request && ! $this->request->apiKeyHasPermission('server-view')) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $this->item($variable->variable, new ServiceVariableTransformer($this->request), 'variable');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user