Commit graph

514 commits

Author SHA1 Message Date
spaceemotion
a85ac87ae8 Refactor to use more laravel logic and improve compatibility with older PHP versions (#206)
* Fix @param namespaces for PHPDocs in ServerPolicy

* Reduce permission check duplication in ServerPolicy

This introduces a new checkPermission method to reduce code duplication when checking for permissions.

* Simplify logic to list accessible servers for the user

We can directly use the pluck function that laravel collections provide to simplify the logic.

* Fix pagination issue when databases/servers exceed 20

Laravels strips out the currently selected tab (or any GET query for that matter) by default when using pagination. the appends() methods helps with keeping that information.

* Refactor unnecessary array_merge calls

We can just append to the array instead of constantly merging a new copy.

* Fix accessing “API Access” on some versions of PHP

The “new” word is reserved and should not be used as a method name.

http://stackoverflow.com/questions/9575590/why-am-i-getting-an-unexpected-t-new-error-in-php

* Fix revoking API keys on older versions of php (5.6)

“string” was not a valid function argument type yet, so revoking keys results in an error on older installations.

* Fix issues with API due to methods named “list”

“list” is yet another reserved keyword in PHP and messes up older installations of PHP (5.6).
This renames all methods named “list” to “lists”. The API route names are left untouched (e.g. still called “api.admin.users.list”).

* Refactor and shorten some API logic

Used laravel collection methods where applicable to directly transform the values instead of converting back and forth.
This also removes some dead variables that were never used as well as getting rid of a n+1 problem in the Service API (loading service variables afterwards, not during the model creation).

* Return model save status in repositories where applicable

* Fix typo in ServicePolicy#powerStart

* Apply StyleCI corrections
2016-12-12 14:30:57 -05:00
Dane Everitt
c3abb32c0c Merge pull request #204 from schrej/feature/terminal-only-scroll-at-bottom
Only auto-scroll terminal on new output when at the bottom
2016-12-10 19:10:41 -05:00
Jakob Schrettenbrunner
d844c4135c update jquery.terminal to v0.11.23
set new scrollBottomOffset to 5 to hopefully resolve issues with chrome
2016-12-10 13:51:07 +01:00
Jakob Schrettenbrunner
c80c6714a1 add small notification to terminal if new invisible output is available 2016-12-10 00:17:23 +01:00
Jakob Schrettenbrunner
96462a119f disable srcollOnEcho for jquery terminal so it will only scroll at the bottom 2016-12-09 23:50:51 +01:00
Jakob Schrettenbrunner
2a101c0ffd update to jquery terminal v0.11.22 2016-12-09 23:50:22 +01:00
Dane Everitt
0472706807 Update CHANGELOG.md 2016-12-07 19:30:55 -05:00
Dane Everitt
b96e5a23e5 Merge pull request #203 from Pterodactyl/analysis-XNM13L
Apply fixes from StyleCI
2016-12-07 18:36:47 -05:00
Dane Everitt
c1fb0a665f Apply fixes from StyleCI 2016-12-07 22:46:38 +00:00
Dane Everitt
a1d3bbf73d Merge pull request #202 from hammerdawn/FixSubUserView
Fix the subuser edit view, large amount of checkboxes were not properly formatted
2016-12-06 22:35:36 -05:00
Emmet Young
88837f8ac0 Fix the subuser edit view, large amount of checkboxes were not properly formatted causing the first half of the edit screen to be broken.
Correct the value used for the create files permission.
2016-12-07 14:31:44 +11:00
Emmet Young
f687fab9a2 API: ability to search for an allocation based on the assigned server id (#194) 2016-12-04 22:17:35 -05:00
Dane Everitt
e3587966e2
Update changelog 2016-12-02 19:46:27 -05:00
Dane Everitt
9ae716ee42
show container ID for server in panel
Also shows the UID of the user to ease permissions setting

closes #160
2016-12-02 19:35:08 -05:00
Dane Everitt
2ac734d595
Update node config sent over API 2016-12-02 19:12:29 -05:00
Dane Everitt
777e7138e6
Update regex checking for minecraft services
closes #193
2016-12-02 19:06:14 -05:00
Dane Everitt
e39c750563
Remove link that shouldn't exist in the first place. 2016-12-02 18:47:22 -05:00
Dane Everitt
259b220dfc
misc file cleanup 2016-12-02 18:45:08 -05:00
Dane Everitt
3cd0a8337f
Add ability to filter user list 2016-12-02 18:41:52 -05:00
Dane Everitt
ed5b7559ec
Fixes potential for generated password to not meet own validation requirements 2016-12-01 19:16:40 -05:00
Dane Everitt
90460bef43
New button in file manager that triggers the right click menu
Enable’s support on mobile devices and those who cannot right click
(blessed be them)

closes #182
2016-12-01 19:11:48 -05:00
Dane Everitt
1eb1f96e71
Add support for updating the daemon's configuration file automatically. 2016-12-01 18:33:32 -05:00
Dane Everitt
72ad6d5c87
Show file upload size limit when uploading files
Also handle errors better.
2016-12-01 18:32:05 -05:00
Emmet Young
a03add7e4f Allow API to set a custom ID for server creation. (#187)
* Allow API to set a custom ID for server creation.

Useful when dealing with billing systems such as WHMCS

* Correct API code changes based on feedback.
2016-11-30 11:01:22 -05:00
Dane Everitt
1fc9797458 Merge pull request #189 from schrej/patch-2
fix api /servers/{id}/build
2016-11-30 11:00:54 -05:00
Jakob
03c6f986d2 fix api /servers/{id}/build
remove unrelated error thrown every time
2016-11-30 12:26:23 +01:00
Dane Everitt
93d9efb7d0 Update ISSUE_TEMPLATE.md 2016-11-28 17:32:40 -05:00
Dane Everitt
8f1419b931
Update changelog 2016-11-28 14:00:33 -05:00
Dane Everitt
b4bcc7247f
Add some things to node config block that will be useful to some 2016-11-28 13:55:02 -05:00
Dane Everitt
3549abd5ae
Fix error page when no nodes exist. 2016-11-28 13:51:18 -05:00
Dane Everitt
5c20d0a748
Fix daemon version displaying panel version; closes #184 2016-11-28 13:41:26 -05:00
Dane Everitt
2b16472cd2
Fix data multiplicator on wrong field. 2016-11-28 13:37:36 -05:00
Dane Everitt
f6275058d0
Support for hostnames in database connection field. 2016-11-26 20:27:36 -05:00
Dane Everitt
c107dbfa74
Fixes database server deletion 2016-11-26 20:26:45 -05:00
Dane Everitt
946512bac9
search for owner:<email> correctly. 2016-11-26 20:18:46 -05:00
Dane Everitt
b7a566a937
Fixes defaulting to Deutsch if no language is assigned yet. 2016-11-26 20:14:13 -05:00
Dane Everitt
b2e74d79e9
Update changelog 2016-11-26 20:12:13 -05:00
Dane Everitt
783c373100
Default company name if none is assigned. 2016-11-26 20:05:25 -05:00
Dane Everitt
e47bb6ef0f
Add multiplicators to certain inputs, closes #154
Allows for users to enter `10g` into a memory field and have it
converted to 10GB equivalent in MB.
2016-11-26 19:56:19 -05:00
Dane Everitt
90cd2b677e
Add version checking to daemon and panel
Also includes some buttons for users to get help from the panel.
2016-11-26 19:29:57 -05:00
Dane Everitt
261535d83d
Fix broken block ending for script 2016-11-26 18:52:19 -05:00
Dane Everitt
edaae40df9
Add some quick daemon information when viewing nodes 2016-11-26 18:23:10 -05:00
Dane Everitt
d93f88f471
Properly display node status with newer daemon versions 2016-11-26 17:49:56 -05:00
Dane Everitt
1ad715f1a3
Improve database management for servers, fixes #181 2016-11-26 17:34:14 -05:00
Dane Everitt
723b608e0c
Implement node deletion properly, fixes #173 2016-11-26 16:29:13 -05:00
Dane Everitt
0e89ecb427
Handle node:<param> properly when doing server searches
Uses the node name rather than the node’s ID by default.
2016-11-26 16:19:25 -05:00
Bent Haase
57d62c4ed3 Fix time axis for node and server view
Nope, the current month is not a valid minute
2016-11-19 16:02:47 -05:00
Dane Everitt
b8a6a15b08 Set version to 'canary' on development branch
Official releases are either merged into master or branched off where their version number is then incremented.
2016-11-07 20:08:25 -05:00
Dane Everitt
c52dfe6799
Update changelog 2016-11-07 15:59:52 -05:00
Dane Everitt
659c33f0e8
Fixes a bug that allows a user to bypass 2FA authentication requirements
This bug was reported to us by a user (@Ferry#1704) on Discord on
Monday, November 7th, 2016.

It was disclosed that it was possible to bypass the 2FA checkpoint by
clicking outside of the modal which would prompt the modal to close,
but not submit the form. The user could then press the login button
which would trigger an error. Due to this error being triggered the
authentication attempt was not cancelled. On the next page load the
application recognized the user as logged in and continued on to the
panel.

At no time was it possible to login without using the correct email
address and password.

As a result of this bug we have re-factored the Authentication code for
logins to address the persistent session. Previously accounts were
manually logged back out on 2FA failure. However, as this bug
demonstrated, causing a fatal error in the code would prevent the
logout code from firing, thus preserving their session state.

This commit modifies the code to use a non-persistent login to handle
2FA checking. In order for the session to be saved the application must
complete all portions of the login without any errors, at which point
the user is persistently authenticated using Auth::login().

This resolves the ability to cause an exception and bypass 2FA
verification.
2016-11-07 15:55:57 -05:00