I really need to stop trying to override PHP reserved keywords...
This commit is contained in:
parent
1c37a8fe1a
commit
7eb7377dd5
6 changed files with 8 additions and 8 deletions
|
@ -62,7 +62,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||||
* Servers that a user is assocaited with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP.
|
* Servers that a user is assocaited with as a subuser are now displayed in addition to owned servers when listing users in the Admin CP.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Subuser permissions are now stored in `Permission::list()` to make views way cleaner and make adding to views significantly cleaner.
|
* Subuser permissions are now stored in `Permission::listPermissions()` to make views way cleaner and make adding to views significantly cleaner.
|
||||||
* `[pre.7]` — Sidebar for file manager now is a single link rather than a dropdown.
|
* `[pre.7]` — Sidebar for file manager now is a single link rather than a dropdown.
|
||||||
* Attempting to reset a password for an account that does not exist no longer returns an error, rather it displays a success message. Failed resets trigger a `Pterodactyl\Events\Auth\FailedPasswordReset` event that can be caught if needed to perform other actions.
|
* Attempting to reset a password for an account that does not exist no longer returns an error, rather it displays a success message. Failed resets trigger a `Pterodactyl\Events\Auth\FailedPasswordReset` event that can be caught if needed to perform other actions.
|
||||||
* Servers are no longer queued for deletion due to the general hassle and extra logic required.
|
* Servers are no longer queued for deletion due to the general hassle and extra logic required.
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ServiceController extends Controller
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function list(Request $request)
|
public function listServices(Request $request)
|
||||||
{
|
{
|
||||||
$response = [];
|
$response = [];
|
||||||
foreach (Service::all() as $service) {
|
foreach (Service::all() as $service) {
|
||||||
|
|
|
@ -79,7 +79,7 @@ class SubuserController extends Controller
|
||||||
'server' => $server,
|
'server' => $server,
|
||||||
'node' => $server->node,
|
'node' => $server->node,
|
||||||
'subuser' => $subuser,
|
'subuser' => $subuser,
|
||||||
'permlist' => Models\Permission::list(),
|
'permlist' => Models\Permission::listPermissions(),
|
||||||
'permissions' => $subuser->permissions->mapWithKeys(function ($item, $key) {
|
'permissions' => $subuser->permissions->mapWithKeys(function ($item, $key) {
|
||||||
return [$item->permission => true];
|
return [$item->permission => true];
|
||||||
}),
|
}),
|
||||||
|
@ -147,7 +147,7 @@ class SubuserController extends Controller
|
||||||
|
|
||||||
return view('server.users.new', [
|
return view('server.users.new', [
|
||||||
'server' => $server,
|
'server' => $server,
|
||||||
'permissions' => Models\Permission::list(),
|
'permissions' => Models\Permission::listPermissions(),
|
||||||
'node' => $server->node,
|
'node' => $server->node,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,7 @@ class Permission extends Model
|
||||||
* @param array $single
|
* @param array $single
|
||||||
* @return \Illuminate\Support\Collection|array
|
* @return \Illuminate\Support\Collection|array
|
||||||
*/
|
*/
|
||||||
public static function list($single = false)
|
public static function listPermissions($single = false)
|
||||||
{
|
{
|
||||||
if ($single) {
|
if ($single) {
|
||||||
return collect(self::$permissions)->mapWithKeys(function ($item) {
|
return collect(self::$permissions)->mapWithKeys(function ($item) {
|
||||||
|
|
|
@ -103,7 +103,7 @@ class SubuserRepository
|
||||||
'daemonSecret' => (string) $uuid->generate('servers', 'uuid'),
|
'daemonSecret' => (string) $uuid->generate('servers', 'uuid'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$perms = Permission::list(true);
|
$perms = Permission::listPermissions(true);
|
||||||
$daemonPermissions = $this->coreDaemonPermissions;
|
$daemonPermissions = $this->coreDaemonPermissions;
|
||||||
|
|
||||||
foreach ($data['permissions'] as $permission) {
|
foreach ($data['permissions'] as $permission) {
|
||||||
|
@ -222,7 +222,7 @@ class SubuserRepository
|
||||||
$permission->delete();
|
$permission->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
$perms = Permission::list(true);
|
$perms = Permission::listPermissions(true);
|
||||||
$daemonPermissions = $this->coreDaemonPermissions;
|
$daemonPermissions = $this->coreDaemonPermissions;
|
||||||
|
|
||||||
foreach ($data['permissions'] as $permission) {
|
foreach ($data['permissions'] as $permission) {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
Route::get('/services', 'ServiceController@list')->name('daemon.services');
|
Route::get('/services', 'ServiceController@listServices')->name('daemon.services');
|
||||||
Route::get('/services/pull/{service}/{file}', 'ServiceController@pull')->name('daemon.pull');
|
Route::get('/services/pull/{service}/{file}', 'ServiceController@pull')->name('daemon.pull');
|
||||||
Route::get('/packs/pull/{uuid}', 'PackController@pull')->name('daemon.pack.pull');
|
Route::get('/packs/pull/{uuid}', 'PackController@pull')->name('daemon.pack.pull');
|
||||||
Route::get('/packs/pull/{uuid}/hash', 'PackController@hash')->name('daemon.pack.hash');
|
Route::get('/packs/pull/{uuid}/hash', 'PackController@hash')->name('daemon.pack.hash');
|
||||||
|
|
Loading…
Reference in a new issue