Final adjustments to Daemon <-> Panel communication change
This commit is contained in:
parent
8e2b77dc1e
commit
7d1c233c49
32 changed files with 528 additions and 538 deletions
|
@ -31,8 +31,6 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface as DatabaseServer
|
|||
|
||||
class ServerRepository extends BaseRepository implements ServerRepositoryInterface
|
||||
{
|
||||
const DAEMON_PERMISSIONS = ['s:*'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@ -73,9 +71,6 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
|||
],
|
||||
'rebuild' => false,
|
||||
'start_on_completion' => $start,
|
||||
'keys' => [
|
||||
(string) $server->daemonSecret => self::DAEMON_PERMISSIONS,
|
||||
],
|
||||
];
|
||||
|
||||
// Loop through overrides.
|
||||
|
@ -88,22 +83,6 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setSubuserKey($key, array $permissions)
|
||||
{
|
||||
Assert::stringNotEmpty($key, 'First argument passed to setSubuserKey must be a non-empty string, received %s.');
|
||||
|
||||
return $this->getHttpClient()->request('PATCH', '/server', [
|
||||
'json' => [
|
||||
'keys' => [
|
||||
$key => $permissions,
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
@ -169,4 +148,14 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
|||
{
|
||||
return $this->getHttpClient()->request('GET', '/servers');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function revokeAccessKey($key)
|
||||
{
|
||||
Assert::stringNotEmpty($key, 'First argument passed to revokeAccessKey must be a non-empty string, received %s.');
|
||||
|
||||
return $this->getHttpClient()->request('DELETE', '/keys/' . $key);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue