Update users & locations to use new permissions format

This commit is contained in:
Dane Everitt 2018-01-12 20:39:15 -06:00
parent a31e5875dc
commit d644a53951
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 355 additions and 72 deletions

View file

@ -1,11 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Models;

View file

@ -126,6 +126,7 @@ class User extends Model implements
protected static $applicationRules = [
'uuid' => 'required',
'email' => 'required',
'external_id' => 'sometimes',
'username' => 'required',
'name_first' => 'required',
'name_last' => 'required',
@ -142,6 +143,7 @@ class User extends Model implements
protected static $dataIntegrityRules = [
'uuid' => 'string|size:36|unique:users,uuid',
'email' => 'email|unique:users,email',
'external_id' => 'nullable|string|max:255|unique:users,external_id',
'username' => 'alpha_dash|between:1,255|unique:users,username',
'name_first' => 'string|between:1,255',
'name_last' => 'string|between:1,255',