Commit graph

35 commits

Author SHA1 Message Date
Dane Everitt
820d2bf172
Node and user API routes implemented.
More attempts at the logic for API permissions, most likely will need
continued tweaking in the future, but base is there.
2017-04-09 15:31:10 -04:00
Dane Everitt
0312c974f5
Update doc blocks for all app/ 2017-03-19 19:36:50 -04:00
Dane Everitt
5bbded2c03
Correctly json_encode validation errors. 2017-03-16 19:30:04 -04:00
Dane Everitt
b11029a666 Apply fixes from StyleCI (#312)
* Bump for release

* Apply fixes from StyleCI
2017-02-18 22:57:50 -05:00
Dane Everitt
054e65b78f
Fix user deletion 2017-02-17 19:28:23 -05:00
Dane Everitt
95171a3e41
Better user creation email. 2017-02-17 18:48:57 -05:00
Dane Everitt
4f61637284
More model updates to more places than I anticipated.
This probably broke a lot of things.
2017-02-09 17:43:54 -05:00
Dane Everitt
bf7b58470a
Update copyright headers 2017-01-24 17:57:08 -05:00
Dane Everitt
5f1bfcf980
Much cleaner code for updating user details front-end 2017-01-22 16:16:43 -05:00
Emmet Young
9025f1f583 Repair user creation functionality
Repair functionality of the make user console command (pterodactyl:user)
Fix up the user repository, was using the old $password instead of the changed format $data['password']
Change User model to allow root_admin to be a fillable item.
2017-01-23 00:47:09 +11:00
Dane Everitt
e91362eee6
Update user controller 2017-01-12 15:40:24 -05:00
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
c1fb0a665f Apply fixes from StyleCI 2016-12-07 22:46:38 +00:00
Dane Everitt
745c735b32
Add initial basic API changes
New route is `/api/me`
2016-10-14 20:22:23 -04:00
Dane Everitt
9d10c2a757
Support custom user id though API, closes #115 2016-10-06 22:36:59 -04:00
Dominic Fitch-Jones
b67813b260 Make sure that you can't delete your own account. (#110) 2016-10-02 21:27:25 -04:00
Dane Everitt
7529e961de Add back API (#80)
Re-implements the API after it was removed in the Laravel 5.3 upgrade.
2016-09-05 16:21:36 -04:00
Dane Everitt
b02df8e610 Implement base notifications support (#77)
* initial implementation of notifications
* typehint UUID returns. Fixes that notifications bug
2016-09-05 12:00:56 -04:00
Dane Everitt
84a7eec2e1 Fix all transaction try/catches, closes #57 2016-02-27 10:30:59 -05:00
Dane Everitt
f6be06164f fix user controller; closes #58, closes #59 2016-02-21 01:15:37 -05:00
Dane Everitt
9a07cc83d1 fix password hashing bug; closes #53 2016-02-04 11:11:38 -05:00
Dane Everitt
b63fc02cef Add settings to panel 2016-01-20 22:08:13 -05:00
Dane Everitt
40c68a5391 Add title to copyright 2016-01-20 16:05:16 -05:00
Dane Everitt
026df6a36f Relicense project under MIT
Permission obtained from @DDynamic. Contributions from other users were
removed since we did not obtain permission from them for the re-license.

From this point forward all contributors must have a signed Contributor
License Agreement on file.
2016-01-20 15:56:40 -05:00
Dane Everitt
b0bcb879d0 Add license details to add app files. 2016-01-19 19:10:39 -05:00
Dane Everitt
ac6edc4d64 Completed subuser system 2016-01-18 19:57:10 -05:00
Dane Everitt
69c2e89fe0 Fix some missing exceptions and validation handling for users 2016-01-15 00:08:50 -05:00
Dane Everitt
e2d5145e3d Set user language properly 2016-01-14 23:48:58 -05:00
Dane Everitt
8c9e797210 Finish user portion of API 2016-01-14 23:13:26 -05:00
Dane Everitt
4604500349 Replace tabs with Spaces
I *really* wish Atom would stop doing this to me.
2016-01-12 23:49:56 -05:00
Dane Everitt
695728295a Add support for creating a user using the API 2016-01-12 23:43:33 -05:00
Dane Everitt
f467c3f0eb Improved user management in Admin CP
Fixes a few bugs from PR#17
2016-01-02 15:08:33 -05:00
BlameDylan
6810375d2b View and Delete Users
This commit implements an interface into the Admin Panel that allows
users to be viewed, modified, and deleted.
2016-01-02 00:38:15 -06:00
Dane Everitt
264431a271 Whats this? We can add new servers now?! 2015-12-15 15:08:41 -05:00
Dane Everitt
22b0bbf6ce Model fixing, moving things around to improve code.
Adds unique UUID generator, moves functions into repositories for
adding servers and users, cleans up code, adding more comments.
2015-12-13 22:22:16 -05:00