Merge branch 'develop' into feature/vuejs-auth

This commit is contained in:
Dane Everitt 2018-05-26 12:17:14 -07:00
commit cf90f56777
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
188 changed files with 854 additions and 625 deletions

View file

@ -9,9 +9,9 @@ class AdminAcl
{
/**
* Resource permission columns in the api_keys table begin
* with this identifer.
* with this identifier.
*/
const COLUMN_IDENTIFER = 'r_';
const COLUMN_IDENTIFIER = 'r_';
/**
* The different types of permissions available for API keys. This
@ -63,13 +63,14 @@ class AdminAcl
*/
public static function check(ApiKey $key, string $resource, int $action = self::READ)
{
return self::can(data_get($key, self::COLUMN_IDENTIFER . $resource, self::NONE), $action);
return self::can(data_get($key, self::COLUMN_IDENTIFIER . $resource, self::NONE), $action);
}
/**
* Return a list of all resource constants defined in this ACL.
*
* @return array
* @throws \ReflectionException
*/
public static function getResourceList(): array
{

View file

@ -51,7 +51,7 @@ class KeyCreationService
/**
* Create a new API key for the Panel using the permissions passed in the data request.
* This will automatically generate an identifer and an encrypted token that are
* This will automatically generate an identifier and an encrypted token that are
* stored in the database.
*
* @param array $data

View file

@ -24,9 +24,9 @@
namespace Pterodactyl\Services\DaemonKeys;
use Illuminate\Log\Writer;
use Webmozart\Assert\Assert;
use Pterodactyl\Models\Server;
use Psr\Log\LoggerInterface as Writer;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Exceptions\DisplayException;
@ -57,7 +57,7 @@ class DaemonKeyDeletionService
protected $serverRepository;
/**
* @var \Illuminate\Log\Writer
* @var \Psr\Log\LoggerInterface
*/
protected $writer;
@ -68,7 +68,7 @@ class DaemonKeyDeletionService
* @param \Pterodactyl\Contracts\Repository\DaemonKeyRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
* @param \Illuminate\Log\Writer $writer
* @param \Psr\Log\LoggerInterface $writer
*/
public function __construct(
ConnectionInterface $connection,

View file

@ -88,7 +88,7 @@ class FindViableNodesService
* attempt to find all nodes in the defined locations that meet the disk and
* memory availability requirements. Any nodes not meeting those requirements
* are tossed out, as are any nodes marked as non-public, meaning automatic
* deployments should not be done aganist them.
* deployments should not be done against them.
*
* @return int[]
* @throws \Pterodactyl\Exceptions\Service\Deployment\NoViableNodeException

View file

@ -15,7 +15,7 @@ use Pterodactyl\Contracts\Repository\EggRepositoryInterface;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
use Pterodactyl\Exceptions\Service\Egg\NoParentConfigurationFoundException;
// When a mommy and a daddy pterodactyl really like eachother...
// When a mommy and a daddy pterodactyl really like each other...
class EggCreationService
{
/**

View file

@ -47,7 +47,7 @@ class InstallScriptService
}
if (! is_null(array_get($data, 'copy_script_from'))) {
if (! $this->repository->isCopiableScript(array_get($data, 'copy_script_from'), $egg->nest_id)) {
if (! $this->repository->isCopyableScript(array_get($data, 'copy_script_from'), $egg->nest_id)) {
throw new InvalidCopyFromException(trans('exceptions.nest.egg.invalid_copy_id'));
}
}

View file

@ -63,7 +63,7 @@ class ProcessScheduleService
{
$this->repository->loadTasks($schedule);
$formattedCron = sprintf('%s %s %s * %s *',
$formattedCron = sprintf('%s %s %s * %s',
$schedule->cron_minute,
$schedule->cron_hour,
$schedule->cron_day_of_month,

View file

@ -86,7 +86,7 @@ class ScheduleCreationService
*/
private function getCronTimestamp(array $data)
{
$formattedCron = sprintf('%s %s %s * %s *',
$formattedCron = sprintf('%s %s %s * %s',
array_get($data, 'cron_minute', '*'),
array_get($data, 'cron_hour', '*'),
array_get($data, 'cron_day_of_month', '*'),

View file

@ -98,7 +98,7 @@ class ScheduleUpdateService
*/
private function getCronTimestamp(array $data)
{
$formattedCron = sprintf('%s %s %s * %s *',
$formattedCron = sprintf('%s %s %s * %s',
array_get($data, 'cron_minute', '*'),
array_get($data, 'cron_hour', '*'),
array_get($data, 'cron_day_of_month', '*'),

View file

@ -9,8 +9,7 @@
namespace Pterodactyl\Services\Servers;
use Illuminate\Log\Writer;
use Pterodactyl\Models\Server;
use Psr\Log\LoggerInterface as Writer;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Services\Databases\DatabaseManagementService;
@ -52,7 +51,7 @@ class ServerDeletionService
protected $repository;
/**
* @var \Illuminate\Log\Writer
* @var \Psr\Log\LoggerInterface
*/
protected $writer;
@ -64,7 +63,7 @@ class ServerDeletionService
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Log\Writer $writer
* @param \Psr\Log\LoggerInterface $writer
*/
public function __construct(
ConnectionInterface $connection,

View file

@ -24,7 +24,7 @@ class StartupCommandViewService
/**
* Generate a startup command for a server and return all of the user-viewable variables
* as well as thier assigned values.
* as well as their assigned values.
*
* @param int $server
* @return \Illuminate\Support\Collection

View file

@ -9,8 +9,8 @@
namespace Pterodactyl\Services\Servers;
use Illuminate\Log\Writer;
use Pterodactyl\Models\Server;
use Psr\Log\LoggerInterface as Writer;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Exceptions\DisplayException;
@ -38,7 +38,7 @@ class SuspensionService
protected $repository;
/**
* @var \Illuminate\Log\Writer
* @var \Psr\Log\LoggerInterface
*/
protected $writer;
@ -48,7 +48,7 @@ class SuspensionService
* @param \Illuminate\Database\ConnectionInterface $database
* @param \Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface $daemonServerRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Log\Writer $writer
* @param \Psr\Log\LoggerInterface $writer
*/
public function __construct(
ConnectionInterface $database,

View file

@ -63,7 +63,7 @@ class VariableValidatorService
}
/**
* Validate all of the passed data aganist the given service option variables.
* Validate all of the passed data against the given service option variables.
*
* @param int $egg
* @param array $fields

View file

@ -52,7 +52,7 @@ class AuthenticateUsingPasswordService
}
/**
* Attempt to authenticate a provded username and password and determine if they
* Attempt to authenticate a provided username and password and determine if they
* have permission to access a given server. This function does not account for
* subusers currently. Only administrators and server owners can login to access
* their files at this time.

View file

@ -10,7 +10,6 @@
namespace Pterodactyl\Services\Subusers;
use Pterodactyl\Models\Server;
use Pterodactyl\Rules\Username;
use Illuminate\Database\ConnectionInterface;
use Pterodactyl\Services\Users\UserCreationService;
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;

View file

@ -47,7 +47,7 @@ class UserUpdateService
/**
* Update the user model instance. If the user has been removed as an administrator
* revoke all of the authentication tokens that have beenn assigned to their account.
* revoke all of the authentication tokens that have been assigned to their account.
*
* @param \Pterodactyl\Models\User $user
* @param array $data