Fix a few bugs

This commit is contained in:
Dane Everitt 2016-01-18 21:35:37 -05:00
parent ac6edc4d64
commit a457bf2806
2 changed files with 20 additions and 26 deletions

View File

@ -17,6 +17,22 @@ use Pterodactyl\Exceptions\DisplayValidationException;
class ServerRepository class ServerRepository
{ {
protected $daemonPermissions = [
's:get',
's:power:start',
's:power:stop',
's:power:restart',
's:power:kill',
's:console',
's:command',
's:files:get',
's:files:read',
's:files:post',
's:files:delete',
's:files:upload',
's:set-password'
];
public function __construct() public function __construct()
{ {
// //
@ -236,18 +252,7 @@ class ServerRepository
'option' => $option->tag 'option' => $option->tag
], ],
'keys' => [ 'keys' => [
(string) $server->daemonSecret => [ (string) $server->daemonSecret => $this->daemonPermissions
's:get',
's:power',
's:console',
's:command',
's:files:get',
's:files:read',
's:files:post',
's:files:delete',
's:files:upload',
's:set-password'
]
], ],
'rebuild' => false 'rebuild' => false
] ]
@ -336,18 +341,7 @@ class ServerRepository
'json' => [ 'json' => [
'keys' => [ 'keys' => [
(string) $oldDaemonKey => [], (string) $oldDaemonKey => [],
(string) $server->daemonSecret => [ (string) $server->daemonSecret => $this->daemonPermissions
's:get',
's:power',
's:console',
's:command',
's:files:get',
's:files:read',
's:files:post',
's:files:delete',
's:files:upload',
's:set-password'
]
] ]
] ]
]); ]);

View File

@ -248,8 +248,8 @@
"listen": {{ $node->daemonListen }}, "listen": {{ $node->daemonListen }},
"ssl": { "ssl": {
"enabled": {{ $node->sceheme === 'https' ? 'true' : 'false' }}, "enabled": {{ $node->sceheme === 'https' ? 'true' : 'false' }},
"certificate": "~/.ssl/ssl.cert", "certificate": "/etc/letsencrypt/live/{{ $node->fqdn }}/fullchain.pem",
"key": "~/.ssl/ssl.key" "key": "/etc/letsencrypt/live/{{ $node->fqdn }}/privkey.pem"
} }
}, },
"docker": { "docker": {