Commit Graph

445 Commits

Author SHA1 Message Date
DaneEveritt f7fc67344e
Ensure tokens are found in the database using the expected logic 2022-05-22 16:05:58 -04:00
DaneEveritt bd37978a98
Initial pass at implementing Laravel Sanctum for authorization on the API 2022-05-22 14:57:06 -04:00
DaneEveritt e313dff674
Massively simplify API binding logic
Changes the API internals to use normal Laravel binding which automatically supports nested-models and can determine their relationships. This removes a lot of confusingly complex internal logic and replaces it with standard Laravel code.

This also removes a deprecated "getModel" method and fully replaces it with a "parameter" method that does stricter type-checking.
2022-05-22 14:10:01 -04:00
DaneEveritt 6554164252
Add test coverage for the SSH key endpoints 2022-05-14 18:08:48 -04:00
DaneEveritt 97280a62a2
Add support for storing SSH keys on user accounts 2022-05-14 17:31:53 -04:00
DaneEveritt 5705d7dbdd
Run php-cs-fixer 2022-05-14 16:03:50 -04:00
DaneEveritt c8faf64059
Support naming docker images on eggs; closes #4052
Bumps PTDL_v1 export images to PTDL_v2, updates the Minecraft specific eggs to use named images.
2022-05-07 17:45:22 -04:00
DaneEveritt e88d24e0db
Don't allow allocations to be deleted by users if no limit is defined; closes #3703 2022-05-07 15:05:28 -04:00
DaneEveritt c751ce7f44
Allow more values for remote field when creating a database; closes #3842 2022-05-07 14:17:10 -04:00
Matthew Penner 1eaf411cb4
node: lowercase fqdn in letsencrypt path (#3890) 2022-01-17 19:56:57 -07:00
Dane Everitt 7b429831ce
Fix missing user agent headers to store an empty string rather than null value 2021-09-11 13:00:53 -07:00
Dane Everitt 25d9ba4779
Run php-cs-fixer 2021-08-15 17:20:36 -07:00
Matthew Penner 970f281859
backups: default is_successful to false (#3522)
* backups: default is_successful to false
* backups: properly query backups
2021-08-03 19:45:25 -07:00
ClumsyAdmin 57987c0f79
Update Allocation.php (#3468)
Max port typo
2021-07-17 10:02:15 -07:00
Dane Everitt d3e3b1db38
Test that a deleted backup makes an audit log entry 2021-07-11 12:15:39 -07:00
Dane Everitt 5d5e4ca7b1
Add support for locking backups to prevent any accidental deletions 2021-05-03 21:26:09 -07:00
Dane Everitt 92cd659db3
Add underlying data changes necessary for new task & schedule features 2021-05-01 10:44:40 -07:00
Dane Everitt aa0b7977bb
Fix error spam in logs due to missing cron month 2021-03-21 10:49:23 -07:00
Dane Everitt 1476104b30
Fix inability to download files from the panel; closes #3151
Co-Authored-By: xcgc <74693042+xcgc@users.noreply.github.com>
2021-03-07 09:45:27 -08:00
Dane Everitt f558bc880a
Correctly handle error; don't overwrite laravel method 2021-01-30 18:07:48 -08:00
Dane Everitt e30a765071
Simplify logic when a server is in an unsupported state 2021-01-30 13:28:31 -08:00
Dane Everitt be26921fcc
Merge branch 'develop' into dane/restore-backups 2021-01-30 10:10:29 -08:00
Dane Everitt 5515871b2f
Turns out I hate that huge space formatting, disable that mess 2021-01-27 20:52:11 -08:00
Dane Everitt b00def2537
Switch to JSON from TEXT when storing denylist items for an egg; closes #3034 2021-01-26 21:08:53 -08:00
Dane Everitt 0a2c89e9f4
Reeformat with new rules post merge 2021-01-25 19:20:51 -08:00
Dane Everitt 663143de0b
Merge branch 'develop' into dane/restore-backups 2021-01-25 19:16:40 -08:00
Dane Everitt c449ca5155
Use more standardized phpcs 2021-01-23 12:33:34 -08:00
Dane Everitt a043071e3c
Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
2021-01-23 12:12:54 -08:00
Dane Everitt e700b4da78
Whoops, don't store the model until we've successfully completed the transaction internals 2021-01-18 20:14:38 -08:00
Dane Everitt 87371901c0
Add base logic to support sending a request to restore a backup for a server 2021-01-17 17:51:09 -08:00
Dane Everitt cb40b280a4
Fix single failing test 2021-01-17 15:55:46 -08:00
Dane Everitt a75a347d65
Remove suspended & installing fields, replace with single status field 2021-01-17 15:51:56 -08:00
Dane Everitt 4c29be2e54
Adjust some naming real quick 2021-01-17 15:25:49 -08:00
Dane Everitt 291c65275a
Update audit design 2021-01-17 11:52:44 -08:00
Dane Everitt ccecaa6694
Add basic auditing for filesystem actions
Specifically skipping read actions since there isn't much to say there, and it generally wouldn't be very helpful (plus, likely to generate lots of logs).
2021-01-17 11:46:08 -08:00
Dane Everitt b15679d3bb
Add base logic for audit logging 2021-01-17 10:49:36 -08:00
Charles Morgan ffeedf17e4 Adds months for schedules
Adds month variable for schedules
2021-01-16 22:07:39 -05:00
Dane Everitt 239984f92c
Add internal support for file denylist on eggs; closes #569 2021-01-10 17:02:14 -08:00
Dane Everitt 952715facc
Fix handling of upload IDs on backups 2020-12-27 11:34:55 -08:00
Matthew Penner 951d92b143 Store S3 upload_id in the database for backups 2020-12-26 11:59:21 -07:00
Dane Everitt 2ee08a1a3d
Update logic for server transfer controller 2020-12-24 10:10:40 -08:00
Matthew Penner 01926e2896 Improve logic for logging into the websocket of the target node 2020-12-17 10:35:54 -07:00
Matthew Penner 5c5e2e24f1 📯 tRaNsFeR lOgS 📯 2020-12-17 10:35:54 -07:00
Matthew Penner e6c4a68e4a Update logic for tracking a server's transfer state 2020-12-17 10:35:54 -07:00
Dane Everitt 5bbb36b3cf
Support updating docker image for a server from the frontend 2020-12-13 11:07:29 -08:00
Dane Everitt 78c4ac80bc
Basic implemention of multiple selectable images for an egg
The admin side of this is quite ugly when creating/editing a server, but I'm not putting effort into that right now with React Admin soon™
2020-12-13 09:53:17 -08:00
Dane Everitt 802f88fc78
Merge branch 'develop' into permissions 2020-11-08 11:47:45 -08:00
Dane Everitt c20d53bb17
Always return the primary allocation for a server, even without the allocation permissions 2020-11-07 09:57:53 -08:00
Charles Morgan b2d2a931a9
Add missing descriptions for permissions 2020-11-03 16:11:59 -05:00
Dane Everitt 95d605c1e3
Fix validation schema 2020-11-02 20:24:11 -08:00