Should wrap up the base landing page stuff for accounts, next step is server rendering
This commit is contained in:
parent
67ac36f5ce
commit
e045ef443a
32 changed files with 1223 additions and 317 deletions
|
@ -88,4 +88,11 @@ interface ServerRepositoryInterface extends BaseRepositoryInterface
|
|||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function delete();
|
||||
|
||||
/**
|
||||
* Return detials on a specific server.
|
||||
*
|
||||
* @return \Psr\Http\Message\ResponseInterface
|
||||
*/
|
||||
public function details();
|
||||
}
|
||||
|
|
|
@ -74,11 +74,12 @@ interface RepositoryInterface
|
|||
*
|
||||
* @param array $fields
|
||||
* @param bool $validate
|
||||
* @param bool $force
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
*/
|
||||
public function create(array $fields, $validate = true);
|
||||
public function create(array $fields, $validate = true, $force = false);
|
||||
|
||||
/**
|
||||
* Delete a given record from the database.
|
||||
|
|
|
@ -87,4 +87,33 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
|
|||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getDaemonServiceData($id);
|
||||
|
||||
/**
|
||||
* Return an array of server IDs that a given user can access based on owner and subuser permissions.
|
||||
*
|
||||
* @param int $user
|
||||
* @return array
|
||||
*/
|
||||
public function getUserAccessServers($user);
|
||||
|
||||
/**
|
||||
* Return a paginated list of servers that a user can access at a given level.
|
||||
*
|
||||
* @param int $user
|
||||
* @param string $level
|
||||
* @param bool $admin
|
||||
* @param array $relations
|
||||
* @return \Illuminate\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public function filterUserAccessServers($user, $admin = false, $level = 'all', array $relations = []);
|
||||
|
||||
/**
|
||||
* Return a server by UUID.
|
||||
*
|
||||
* @param string $uuid
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getByUuid($uuid);
|
||||
}
|
||||
|
|
45
app/Contracts/Repository/SessionRepositoryInterface.php
Normal file
45
app/Contracts/Repository/SessionRepositoryInterface.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/*
|
||||
* Pterodactyl - Panel
|
||||
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
interface SessionRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Delete a session for a given user.
|
||||
*
|
||||
* @param int $user
|
||||
* @param int $session
|
||||
* @return null|int
|
||||
*/
|
||||
public function deleteUserSession($user, $session);
|
||||
|
||||
/**
|
||||
* Return all of the active sessions for a user.
|
||||
*
|
||||
* @param int $user
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getUserSessions($user);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue