This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yvan Watchman
committed
Jun 28, 2019
1 parent
363a273
commit 5737d2c
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace YWatchman\Panel_Console\Requests; | ||
|
||
interface ClientPermissionsRequest | ||
{ | ||
/** | ||
* Returns the permissions string indicating which permission should be used to | ||
* validate that the authenticated user has permission to perform this action aganist | ||
* the given resource (server). | ||
* | ||
* @return string | ||
*/ | ||
public function permission(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace YWatchman\Panel_Console\Requests; | ||
|
||
use YWatchman\Panel_Console\Requests\ClientPermissionsRequest; | ||
use Pterodactyl\Http\Requests\Api\Client\ClientApiRequest; | ||
|
||
class GetFileContentsRequest extends ClientApiRequest implements ClientPermissionsRequest | ||
{ | ||
/** | ||
* Returns the permissions string indicating which permission should be used to | ||
* validate that the authenticated user has permission to perform this action aganist | ||
* the given resource (server). | ||
* | ||
* @return string | ||
*/ | ||
public function permission(): string | ||
{ | ||
return 'edit-files'; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function rules(): array | ||
{ | ||
return [ | ||
'file' => 'required|string', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters