diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..30b618e --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,2 @@ +coverage_clover: build/logs/clover.xml +json_path: build/logs/coveralls-upload.json diff --git a/README.md b/README.md index a778bb6..7cbf5bb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # squidmin -next generation squid user-management WebUI alternative proxymin,Squid Users Manager +squid user-management WebUI alternative proxymin,Squid Users Manager -![index](https://user-images.githubusercontent.com/7544687/79716113-a3db6000-8310-11ea-8f53-3f512e02aa46.PNG) +Very simple and secure administration panel optimized for proxy distributors ## Pre requirements @@ -14,19 +14,11 @@ https://wiki.squid-cache.org/ConfigExamples/Authenticate/Mysql ## Installation -PHP8+ +PHP8+,composer -## Todo -- [x] WebAPI -- [ ] WebGUI -- [x] Basic User Management -- [x] IP Address Management -- [ ] Customize ACL Rules (ansible?) -- [ ] Documentation -- [ ] WebAPI Documentation -- [x] Feature Tests -- [ ] E2E Tests -- [ ] create docker-compose -- [ ] Multiple Server Management -- [ ] Metrics +## Create an Administrator +``` +php artisan db:seed --class=CreateAdministratorSeeder +``` + diff --git a/app/Http/Controllers/Api/SquidAllowedIpController.php b/app/Http/Controllers/Api/SquidAllowedIpController.php new file mode 100644 index 0000000..31fd3af --- /dev/null +++ b/app/Http/Controllers/Api/SquidAllowedIpController.php @@ -0,0 +1,34 @@ +searchSquidAllowedIp(); + + return new SquidAllowedIpCollection($action($query)); + } + + public function create(CreateRequest $request,CreateAction $action) : SquidAllowedIpResource{ + $squidAllowedIp = $request->createSquidAllowedIp(); + + return new SquidAllowedIpResource($action($squidAllowedIp)); + } + + public function destroy(DestroyRequest $request,DestroyAction $action): SquidAllowedIpResource{ + $squidAllowedIp = $request->destroySquidAllowedIp(); + + return new SquidAllowedIpResource($action($squidAllowedIp)); + } +} diff --git a/app/Http/Controllers/Api/SquidUserController.php b/app/Http/Controllers/Api/SquidUserController.php index 7057ff6..95893a5 100644 --- a/app/Http/Controllers/Api/SquidUserController.php +++ b/app/Http/Controllers/Api/SquidUserController.php @@ -17,10 +17,9 @@ class SquidUserController extends Controller { public function search(SearchRequest $request, SearchAction $action) : SquidUserCollection{ - $user= $request->searchSquidUser(); - $query = $request->validated(); + $query = $request->searchSquidUser(); - return new SquidUserCollection($action($user,$query)); + return new SquidUserCollection($action($query)); } public function create(CreateRequest $request, CreateAction $action) : SquidUserResource{ diff --git a/app/Http/Controllers/Api/UserController.php b/app/Http/Controllers/Api/UserController.php index 8b5c73e..ab47356 100644 --- a/app/Http/Controllers/Api/UserController.php +++ b/app/Http/Controllers/Api/UserController.php @@ -17,10 +17,9 @@ class UserController extends Controller { public function search(SearchRequest $request, SearchAction $action) : UserCollection{ - $user = $request->searchUser(); - $query = $request->validated(); + $query = $request->searchUser(); - return new UserCollection($action($user,$query)); + return new UserCollection($action($query)); } public function create(CreateRequest $request, CreateAction $action) : UserResource{ diff --git a/app/Http/Controllers/Auth/ConfirmPasswordController.php b/app/Http/Controllers/Auth/ConfirmPasswordController.php new file mode 100644 index 0000000..138c1f0 --- /dev/null +++ b/app/Http/Controllers/Auth/ConfirmPasswordController.php @@ -0,0 +1,40 @@ +middleware('auth'); + } +} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..465c39c --- /dev/null +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,22 @@ +middleware('guest')->except('logout'); + } +} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php new file mode 100644 index 0000000..f79a992 --- /dev/null +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -0,0 +1,73 @@ +middleware('guest'); + } + + /** + * Get a validator for an incoming registration request. + * + * @param array $data + * @return \Illuminate\Contracts\Validation\Validator + */ + protected function validator(array $data) + { + return Validator::make($data, [ + 'name' => ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => ['required', 'string', 'min:8', 'confirmed'], + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return \App\Models\User + */ + protected function create(array $data) + { + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => Hash::make($data['password']), + ]); + } +} diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php new file mode 100644 index 0000000..b1726a3 --- /dev/null +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -0,0 +1,30 @@ +middleware('auth'); + $this->middleware('signed')->only('verify'); + $this->middleware('throttle:6,1')->only('verify', 'resend'); + } +} diff --git a/app/Http/Controllers/Gui/SquidAllowedIpController.php b/app/Http/Controllers/Gui/SquidAllowedIpController.php new file mode 100644 index 0000000..30eff10 --- /dev/null +++ b/app/Http/Controllers/Gui/SquidAllowedIpController.php @@ -0,0 +1,34 @@ +$action($request->searchSquidAllowedIp()) + ]); + } + + public function creator(){ + return view('squidallowedips.creator'); + } + + public function create(CreateRequest $request,CreateAction $action){ + $action($request->createSquidAllowedIp()); + return redirect()->route('ip.search',$request->user()->id); + } + + public function destroy(DestroyRequest $request,DestroyAction $action){ + $action($request->destroySquidAllowedIp()); + return redirect()->route('ip.search',$request->user()->id); + } +} diff --git a/app/Http/Controllers/Gui/SquidUserController.php b/app/Http/Controllers/Gui/SquidUserController.php new file mode 100644 index 0000000..635bc67 --- /dev/null +++ b/app/Http/Controllers/Gui/SquidUserController.php @@ -0,0 +1,63 @@ +squidUserService = $squidUserService; + } + + public function search(SearchRequest $request,SearchAction $action){ + return view('squidusers.search',[ + 'users'=>$action($request->searchSquidUser()) + ]); + } + + public function creator(){ + return view('squidusers.creator'); + } + + public function editor(ReadRequest $request){ + $squidUser = $this->squidUserService->getById($request->route()->parameter('id')); + return view('squidusers.editor',[ + 'id'=>$squidUser->id, + 'user'=>$squidUser->user, + 'password'=>$squidUser->password, + 'fullname'=>$squidUser->fullname, + 'comment'=>$squidUser->comment, + 'enabled'=>$squidUser->enabled + ]); + } + + public function modify(ModifyRequest $request,ModifyAction $action){ + $action($request->modifySquidUser()); + return redirect()->route('squiduser.search',$request->user()->id); + } + + + public function create(CreateRequest $request,CreateAction $action){ + $action($request->createSquidUser()); + return redirect()->route('squiduser.search',$request->user()->id); + } + + public function destroy(DestroyRequest $request,DestroyAction $action){ + $action($request->destroySquidUser()); + return redirect()->route('squiduser.search',$request->user()->id); + } +} diff --git a/app/Http/Controllers/Gui/UserController.php b/app/Http/Controllers/Gui/UserController.php new file mode 100644 index 0000000..9741fbd --- /dev/null +++ b/app/Http/Controllers/Gui/UserController.php @@ -0,0 +1,59 @@ +user = $user; + } + + public function create(CreateRequest $request,CreateAction $action){ + $action($request->createUser()); + return redirect()->route('user.search'); + } + + public function modify(ModifyRequest $request,ModifyAction $action){ + $action($request->modifyUser()); + return redirect()->route('user.search'); + } + + public function editor(ReadRequest $request){ + $user = $this->user->getById($request->route()->parameter('id')); + return view('users.editor',[ + 'id'=>$user->id, + 'name'=>$user->name, + 'email'=>$user->email + ]); + } + + public function creator(){ + return view('users.creator'); + } + + public function destroy(DestroyRequest $request,DestroyAction $action){ + $action($request->destroyUser()); + return back(); + } + + public function search(SearchRequest $request,SearchAction $action){ + return view('users.search',[ + 'users'=>$action($request->searchUser()) + ]); + } +} diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php new file mode 100644 index 0000000..7cbc2c3 --- /dev/null +++ b/app/Http/Controllers/HomeController.php @@ -0,0 +1,28 @@ +middleware('auth'); + } + + /** + * Show the application dashboard. + * + * @return \Illuminate\Contracts\Support\Renderable + */ + public function index() + { + return view('home'); + } +} diff --git a/app/Http/Requests/SquidAllowedIp/CreateRequest.php b/app/Http/Requests/SquidAllowedIp/CreateRequest.php new file mode 100644 index 0000000..21dc1f8 --- /dev/null +++ b/app/Http/Requests/SquidAllowedIp/CreateRequest.php @@ -0,0 +1,40 @@ +allows('create-squid-allowed-ip',$this->route()->parameter('user_id')); + return $auth; + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + 'ip'=>'required|ip|unique:squid_allowed_ips' + ]; + } + + public function createSquidAllowedIp() : SquidAllowedIp + { + $squidAllowedIp = new SquidAllowedIp($this->validated()); + $squidAllowedIp->user_id = $this->route()->parameter('user_id'); + return $squidAllowedIp; + } +} diff --git a/app/Http/Requests/SquidAllowedIp/DestroyRequest.php b/app/Http/Requests/SquidAllowedIp/DestroyRequest.php new file mode 100644 index 0000000..dfabe06 --- /dev/null +++ b/app/Http/Requests/SquidAllowedIp/DestroyRequest.php @@ -0,0 +1,39 @@ +allows('destroy-squid-allowed-ip',$squidAllowedIpService->getById($this->route()->parameter('id'))); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + // + ]; + } + + public function destroySquidAllowedIp() : SquidAllowedIp{ + $ip = SquidAllowedIp::query()->where('id','=',$this->route()->parameter('id'))->first(); + return $ip; + } + +} diff --git a/app/Http/Requests/SquidAllowedIp/SearchRequest.php b/app/Http/Requests/SquidAllowedIp/SearchRequest.php new file mode 100644 index 0000000..9adbb4a --- /dev/null +++ b/app/Http/Requests/SquidAllowedIp/SearchRequest.php @@ -0,0 +1,36 @@ +allows('search-squid-allowed-ip',$this->route()->parameter('user_id')); + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + 'per'=>'digits_between:1,100' + ]; + } + + public function searchSquidAllowedIp(){ + $validated = $this->validated(); + return $validated; + } +} diff --git a/app/Http/Requests/SquidUser/CreateRequest.php b/app/Http/Requests/SquidUser/CreateRequest.php index 3d7be1b..7140c9a 100644 --- a/app/Http/Requests/SquidUser/CreateRequest.php +++ b/app/Http/Requests/SquidUser/CreateRequest.php @@ -19,6 +19,15 @@ public function authorize(Gate $gate) return $auth; } + protected function prepareForValidation() + { + if(empty($this->enabled)){ + $this->merge([ + 'enabled'=>0 + ]); + } + } + /** * Get the validation rules that apply to the request. * @@ -27,11 +36,11 @@ public function authorize(Gate $gate) public function rules() { return [ - 'user'=>'required|unique:squid_users', - 'password'=>'required', - 'enabled'=>'required', - 'fullname'=>'filled', - 'comment'=>'filled' + 'user'=>'min:4|required|unique:squid_users', + 'password'=>['required', 'string', 'min:8'], + 'enabled'=>'filled|digits_between:0,1', + 'fullname'=>'nullable', + 'comment'=>'nullable' ]; } diff --git a/app/Http/Requests/SquidUser/DestroyRequest.php b/app/Http/Requests/SquidUser/DestroyRequest.php index 935b48c..2727d60 100644 --- a/app/Http/Requests/SquidUser/DestroyRequest.php +++ b/app/Http/Requests/SquidUser/DestroyRequest.php @@ -35,8 +35,7 @@ public function rules() } public function destroySquidUser() : SquidUser{ - $squidUser = new SquidUser($this->validated()); - $squidUser->id = $this->route()->parameter('id'); + $squidUser = SquidUser::query()->where('id','=',$this->route()->parameter('id'))->first(); return $squidUser; } } diff --git a/app/Http/Requests/SquidUser/ModifyRequest.php b/app/Http/Requests/SquidUser/ModifyRequest.php index 9853aa4..8dd28c5 100644 --- a/app/Http/Requests/SquidUser/ModifyRequest.php +++ b/app/Http/Requests/SquidUser/ModifyRequest.php @@ -22,6 +22,16 @@ public function authorize(Gate $gate,SquidUserService $squidUserService) return $auth; } + + protected function prepareForValidation() + { + if(empty($this->enabled)){ + $this->merge([ + 'enabled'=>0 + ]); + } + } + /** * Get the validation rules that apply to the request. * @@ -30,11 +40,11 @@ public function authorize(Gate $gate,SquidUserService $squidUserService) public function rules() { return [ - 'user'=>'filled|unique:squid_users,user,'.$this->route()->parameter('id').',id', - 'password'=>'filled', - 'enabled'=>'filled', - 'fullname'=>'filled', - 'comment'=>'filled' + 'user'=>'min:4|filled|unique:squid_users,user,'.$this->route()->parameter('id').',id', + 'password'=>['required', 'string', 'min:8'], + 'enabled'=>'filled|digits_between:0,1', + 'fullname'=>'nullable', + 'comment'=>'nullable' ]; } diff --git a/app/Http/Requests/SquidUser/ReadRequest.php b/app/Http/Requests/SquidUser/ReadRequest.php new file mode 100644 index 0000000..39dfbec --- /dev/null +++ b/app/Http/Requests/SquidUser/ReadRequest.php @@ -0,0 +1,34 @@ +allows('modify-squid-user', + $squidUserService->getById($this->route()->parameter('id')) + ); + return $auth; + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + ]; + } +} diff --git a/app/Http/Requests/SquidUser/SearchRequest.php b/app/Http/Requests/SquidUser/SearchRequest.php index 20c0c14..2b033e7 100644 --- a/app/Http/Requests/SquidUser/SearchRequest.php +++ b/app/Http/Requests/SquidUser/SearchRequest.php @@ -2,7 +2,6 @@ namespace App\Http\Requests\SquidUser; -use App\Models\SquidUser; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Foundation\Http\FormRequest; @@ -31,11 +30,8 @@ public function rules() ]; } - public function searchSquidUser(){ - $squidUser = new SquidUser($this->validated()); - $squidUser->user_id = $this->route()->parameter('user_id'); - - return $squidUser; + public function searchSquidUser(): array{ + $validated = $this->validated(); + return $validated; } - } diff --git a/app/Http/Requests/User/CreateRequest.php b/app/Http/Requests/User/CreateRequest.php index 357762a..aa905f6 100644 --- a/app/Http/Requests/User/CreateRequest.php +++ b/app/Http/Requests/User/CreateRequest.php @@ -29,7 +29,7 @@ public function rules() return [ 'name'=>'required', 'email'=>'required|unique:users', - 'password'=>'required', + 'password'=>['required', 'string', 'min:8'], ]; } diff --git a/app/Http/Requests/User/DestroyRequest.php b/app/Http/Requests/User/DestroyRequest.php index 0d13d35..057e9be 100644 --- a/app/Http/Requests/User/DestroyRequest.php +++ b/app/Http/Requests/User/DestroyRequest.php @@ -29,8 +29,7 @@ public function rules() public function destroyUser(): User { - $user = new User(); - $user->id = $this->route()->parameter('id'); + $user = User::query()->where('id','=',$this->route()->parameter('id'))->first(); return $user; } } diff --git a/app/Http/Requests/User/ModifyRequest.php b/app/Http/Requests/User/ModifyRequest.php index ce47e84..93506d6 100644 --- a/app/Http/Requests/User/ModifyRequest.php +++ b/app/Http/Requests/User/ModifyRequest.php @@ -18,8 +18,8 @@ public function rules() { return [ 'name'=>'filled', - 'email'=>'filled', - 'password'=>'filled', + 'email'=>'filled|unique:users,email,'.$this->route()->parameter('id').',id', + 'password'=>['string', 'min:8','filled'], ]; } diff --git a/app/Http/Requests/User/ReadRequest.php b/app/Http/Requests/User/ReadRequest.php new file mode 100644 index 0000000..3b0ea2d --- /dev/null +++ b/app/Http/Requests/User/ReadRequest.php @@ -0,0 +1,31 @@ +allows('search-user'); + return $auth; + } + + /** + * Get the validation rules that apply to the request. + * + * @return array + */ + public function rules() + { + return [ + ]; + } +} diff --git a/app/Http/Requests/User/SearchRequest.php b/app/Http/Requests/User/SearchRequest.php index c36f0ab..b9c8792 100644 --- a/app/Http/Requests/User/SearchRequest.php +++ b/app/Http/Requests/User/SearchRequest.php @@ -31,7 +31,8 @@ public function rules() ]; } - public function searchUser(){ - return $this->user(); + public function searchUser(): array{ + $validated = $this->validated(); + return $validated; } } diff --git a/app/Http/Resources/SquidAllowedIpCollection.php b/app/Http/Resources/SquidAllowedIpCollection.php new file mode 100644 index 0000000..b28ed35 --- /dev/null +++ b/app/Http/Resources/SquidAllowedIpCollection.php @@ -0,0 +1,23 @@ +$this->collection + ]; + } +} diff --git a/app/Http/Resources/SquidAllowedIpResource.php b/app/Http/Resources/SquidAllowedIpResource.php new file mode 100644 index 0000000..55c80e3 --- /dev/null +++ b/app/Http/Resources/SquidAllowedIpResource.php @@ -0,0 +1,23 @@ + $this->resource->id, + 'ip'=>$this->resource->ip + ]; + } +} diff --git a/app/Models/SquidAllowedIp.php b/app/Models/SquidAllowedIp.php index c43f5e1..65127e6 100644 --- a/app/Models/SquidAllowedIp.php +++ b/app/Models/SquidAllowedIp.php @@ -2,10 +2,20 @@ namespace App\Models; +use App\Models\Scopes\SquidUserScope; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class SquidAllowedIp extends Model { use HasFactory; + + protected $fillable = [ + 'ip', + ]; + + protected static function booted() + { + static::addGlobalScope(new SquidUserScope()); + } } diff --git a/app/Policies/AllowedIpPolicy.php b/app/Policies/AllowedIpPolicy.php index ee83dc1..32fee33 100644 --- a/app/Policies/AllowedIpPolicy.php +++ b/app/Policies/AllowedIpPolicy.php @@ -2,6 +2,7 @@ namespace App\Policies; +use App\Models\SquidAllowedIp; use App\Models\User; use Illuminate\Auth\Access\HandlesAuthorization; @@ -18,4 +19,41 @@ public function __construct() { // } + + public function search(User $user,string $toSpecifiedUserId){ + if($user->is_administrator === 1){ + return true; + } + + if(strcmp((string)$user->id,$toSpecifiedUserId) === 0){ + return true; + } + + return false; + } + + public function create(User $user,string $toSpecifiedUserId){ + if($user->is_administrator === 1){ + return true; + } + + if(strcmp((string)$user->id,$toSpecifiedUserId) === 0){ + return true; + } + + return false; + } + + public function destroy(User $user,SquidAllowedIp $squidAllowedIp){ + if($user->is_administrator === 1){ + return true; + } + + if(strcmp((string)$user->id,(string)$squidAllowedIp->user_id) === 0){ + return true; + } + + return false; + } + } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index f830b0d..7c94f0b 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -37,7 +37,8 @@ public function boot() Gate::define('destroy-squid-user', [SquidUserPolicy::class, 'destroy']); Gate::define('search-squid-user', [SquidUserPolicy::class, 'search']); - Gate::define('create-allowed-ip', [AllowedIpPolicy::class, 'create']); - Gate::define('destroy-allowed-ip', [AllowedIpPolicy::class, 'destroy']); + Gate::define('create-squid-allowed-ip', [AllowedIpPolicy::class, 'create']); + Gate::define('destroy-squid-allowed-ip', [AllowedIpPolicy::class, 'destroy']); + Gate::define('search-squid-allowed-ip', [AllowedIpPolicy::class, 'search']); } } diff --git a/app/Services/SquidAllowedIpService.php b/app/Services/SquidAllowedIpService.php new file mode 100644 index 0000000..9b0e4bc --- /dev/null +++ b/app/Services/SquidAllowedIpService.php @@ -0,0 +1,12 @@ +where('id','=',$id)->first(); + return $ip ?? new SquidAllowedIp(); + } +} diff --git a/app/Services/UserService.php b/app/Services/UserService.php new file mode 100644 index 0000000..39ec3a5 --- /dev/null +++ b/app/Services/UserService.php @@ -0,0 +1,12 @@ +where('id','=',$id)->first(); + return $user ?? new User(); + } +} diff --git a/app/UseCases/AllowedIp/CreateAction.php b/app/UseCases/AllowedIp/CreateAction.php new file mode 100644 index 0000000..4c9a0ff --- /dev/null +++ b/app/UseCases/AllowedIp/CreateAction.php @@ -0,0 +1,15 @@ +exists); + $squidAllowedIp->save(); + + return $squidAllowedIp; + } +} diff --git a/app/UseCases/AllowedIp/DestroyAction.php b/app/UseCases/AllowedIp/DestroyAction.php new file mode 100644 index 0000000..c2a9037 --- /dev/null +++ b/app/UseCases/AllowedIp/DestroyAction.php @@ -0,0 +1,14 @@ +exists); + $squidAllowedIp->delete(); + return $squidAllowedIp; + } +} diff --git a/app/UseCases/AllowedIp/ModifyAction.php b/app/UseCases/AllowedIp/ModifyAction.php new file mode 100644 index 0000000..91d7ff9 --- /dev/null +++ b/app/UseCases/AllowedIp/ModifyAction.php @@ -0,0 +1,11 @@ +simplePaginate($query['per'] ?? 100) + ->withQueryString() + ; + + return $ips; + } +} diff --git a/app/UseCases/SquidUser/DestroyAction.php b/app/UseCases/SquidUser/DestroyAction.php index 961035d..e69ea8b 100644 --- a/app/UseCases/SquidUser/DestroyAction.php +++ b/app/UseCases/SquidUser/DestroyAction.php @@ -7,9 +7,8 @@ class DestroyAction{ public function __invoke(SquidUser $squidUser): SquidUser { - $modifyUser = SquidUser::query()->where('id','=',$squidUser->id)->first(); - assert($modifyUser->exists); - $modifyUser->delete(); - return $modifyUser; + assert($squidUser->exists); + $squidUser->delete(); + return $squidUser; } } diff --git a/app/UseCases/SquidUser/SearchAction.php b/app/UseCases/SquidUser/SearchAction.php index 361905b..b9b308e 100644 --- a/app/UseCases/SquidUser/SearchAction.php +++ b/app/UseCases/SquidUser/SearchAction.php @@ -4,7 +4,7 @@ use App\Models\SquidUser; class SearchAction{ - public function __invoke(SquidUser $squidUser,array $query) + public function __invoke(array $query) { $squidUsers = SquidUser::query() ->simplePaginate($query['per'] ?? 100) diff --git a/app/UseCases/User/DestroyAction.php b/app/UseCases/User/DestroyAction.php index c08d993..9326703 100644 --- a/app/UseCases/User/DestroyAction.php +++ b/app/UseCases/User/DestroyAction.php @@ -6,15 +6,19 @@ class DestroyAction{ /** - * @param User $user + * @param User $destroyUser * @return User */ - public function __invoke(User $user): User + public function __invoke(User $destroyUser): User { - assert($user->id !== null); - $destroyUser = User::query()->where('id','=',$user->id)->first(); assert($destroyUser->exists); - assert($destroyUser->is_administrator === 0); + $countAdministrator = User::query() + ->where('id','<>',$destroyUser->id) + ->where('is_administrator','=',1) + ->count() + ; + //disable locked out. + assert($countAdministrator !== 0); $destroyUser->delete(); return $destroyUser; } diff --git a/app/UseCases/User/SearchAction.php b/app/UseCases/User/SearchAction.php index dac263c..3918511 100644 --- a/app/UseCases/User/SearchAction.php +++ b/app/UseCases/User/SearchAction.php @@ -4,7 +4,7 @@ use App\Models\User; class SearchAction{ - public function __invoke(User $user,array $query) + public function __invoke(array $query) { $users = User::query() ->simplePaginate($query['per'] ?? 100) diff --git a/composer.lock b/composer.lock index da7b6be..69597d0 100644 --- a/composer.lock +++ b/composer.lock @@ -572,16 +572,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { @@ -676,7 +676,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -692,7 +692,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", @@ -895,16 +895,16 @@ }, { "name": "laravel/framework", - "version": "v9.3.1", + "version": "v9.11.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "c1c4404511b83fbf90ccbcdf864d4a85537f35e4" + "reference": "598a8c84d452a66b90a3213b1d67189cc726c728" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/c1c4404511b83fbf90ccbcdf864d4a85537f35e4", - "reference": "c1c4404511b83fbf90ccbcdf864d4a85537f35e4", + "url": "https://api.github.com/repos/laravel/framework/zipball/598a8c84d452a66b90a3213b1d67189cc726c728", + "reference": "598a8c84d452a66b90a3213b1d67189cc726c728", "shasum": "" }, "require": { @@ -1070,24 +1070,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-03-03T15:15:10+00:00" + "time": "2022-05-03T14:47:20+00:00" }, { "name": "laravel/sanctum", - "version": "v2.14.2", + "version": "v2.15.1", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66" + "reference": "31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/dc5d749ba9bfcfd68d8f5c272238f88bea223e66", - "reference": "dc5d749ba9bfcfd68d8f5c272238f88bea223e66", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473", + "reference": "31fbe6f85aee080c4dc2f9b03dc6dd5d0ee72473", "shasum": "" }, "require": { "ext-json": "*", + "illuminate/console": "^6.9|^7.0|^8.0|^9.0", "illuminate/contracts": "^6.9|^7.0|^8.0|^9.0", "illuminate/database": "^6.9|^7.0|^8.0|^9.0", "illuminate/support": "^6.9|^7.0|^8.0|^9.0", @@ -1134,7 +1135,7 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2022-02-16T14:40:23+00:00" + "time": "2022-04-08T13:39:49+00:00" }, { "name": "laravel/serializable-closure", @@ -1197,16 +1198,16 @@ }, { "name": "laravel/tinker", - "version": "v2.7.0", + "version": "v2.7.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "5f2f9815b7631b9f586a3de7933c25f9327d4073" + "reference": "dff39b661e827dae6e092412f976658df82dbac5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/5f2f9815b7631b9f586a3de7933c25f9327d4073", - "reference": "5f2f9815b7631b9f586a3de7933c25f9327d4073", + "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", + "reference": "dff39b661e827dae6e092412f976658df82dbac5", "shasum": "" }, "require": { @@ -1259,9 +1260,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.0" + "source": "https://github.com/laravel/tinker/tree/v2.7.2" }, - "time": "2022-01-10T08:52:49+00:00" + "time": "2022-03-23T12:38:24+00:00" }, { "name": "laravel/ui", @@ -1326,16 +1327,16 @@ }, { "name": "league/commonmark", - "version": "2.2.3", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "47b015bc4e50fd4438c1ffef6139a1fb65d2ab71" + "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/47b015bc4e50fd4438c1ffef6139a1fb65d2ab71", - "reference": "47b015bc4e50fd4438c1ffef6139a1fb65d2ab71", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/32a49eb2b38fe5e5c417ab748a45d0beaab97955", + "reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955", "shasum": "" }, "require": { @@ -1344,17 +1345,19 @@ "php": "^7.4 || ^8.0", "psr/event-dispatcher": "^1.0", "symfony/deprecation-contracts": "^2.1 || ^3.0", - "symfony/polyfill-php80": "^1.15" + "symfony/polyfill-php80": "^1.16" }, "require-dev": { "cebe/markdown": "^1.0", "commonmark/cmark": "0.30.0", "commonmark/commonmark.js": "0.30.0", "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", "michelf/php-markdown": "^1.4", + "nyholm/psr7": "^1.5", "phpstan/phpstan": "^0.12.88 || ^1.0.0", "phpunit/phpunit": "^9.5.5", "scrutinizer/ocular": "^1.8.1", @@ -1369,7 +1372,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.3-dev" + "dev-main": "2.4-dev" } }, "autoload": { @@ -1426,7 +1429,7 @@ "type": "tidelift" } ], - "time": "2022-02-26T21:24:45+00:00" + "time": "2022-04-07T22:37:05+00:00" }, { "name": "league/config", @@ -1512,16 +1515,16 @@ }, { "name": "league/flysystem", - "version": "3.0.10", + "version": "3.0.19", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "bbc5026adb5a423dfcdcecec74c7e15943ff6115" + "reference": "670df21225d68d165a8df38587ac3f41caf608f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/bbc5026adb5a423dfcdcecec74c7e15943ff6115", - "reference": "bbc5026adb5a423dfcdcecec74c7e15943ff6115", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/670df21225d68d165a8df38587ac3f41caf608f8", + "reference": "670df21225d68d165a8df38587ac3f41caf608f8", "shasum": "" }, "require": { @@ -1582,7 +1585,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.0.10" + "source": "https://github.com/thephpleague/flysystem/tree/3.0.19" }, "funding": [ { @@ -1598,20 +1601,20 @@ "type": "tidelift" } ], - "time": "2022-02-26T11:09:13+00:00" + "time": "2022-05-03T21:19:02+00:00" }, { "name": "league/mime-type-detection", - "version": "1.9.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69" + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/aa70e813a6ad3d1558fc927863d47309b4c23e69", - "reference": "aa70e813a6ad3d1558fc927863d47309b4c23e69", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd", + "reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd", "shasum": "" }, "require": { @@ -1642,7 +1645,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.9.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0" }, "funding": [ { @@ -1654,20 +1657,20 @@ "type": "tidelift" } ], - "time": "2021-11-21T11:48:40+00:00" + "time": "2022-04-17T13:12:02+00:00" }, { "name": "monolog/monolog", - "version": "2.3.5", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" + "reference": "4192345e260f1d51b365536199744b987e160edc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", - "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc", + "reference": "4192345e260f1d51b365536199744b987e160edc", "shasum": "" }, "require": { @@ -1689,7 +1692,7 @@ "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", - "rollbar/rollbar": "^1.3", + "rollbar/rollbar": "^1.3 || ^2 || ^3", "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, @@ -1741,7 +1744,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.3.5" + "source": "https://github.com/Seldaek/monolog/tree/2.5.0" }, "funding": [ { @@ -1753,20 +1756,20 @@ "type": "tidelift" } ], - "time": "2021-10-01T21:08:31+00:00" + "time": "2022-04-08T15:43:54+00:00" }, { "name": "nesbot/carbon", - "version": "2.57.0", + "version": "2.58.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78" + "reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78", - "reference": "4a54375c21eea4811dbd1149fe6b246517554e78", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/97a34af22bde8d0ac20ab34b29d7bfe360902055", + "reference": "97a34af22bde8d0ac20ab34b29d7bfe360902055", "shasum": "" }, "require": { @@ -1784,7 +1787,8 @@ "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12.54 || ^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14", + "phpunit/php-file-iterator": "^2.0.5", + "phpunit/phpunit": "^7.5.20 || ^8.5.23", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -1849,7 +1853,7 @@ "type": "tidelift" } ], - "time": "2022-02-13T18:13:33+00:00" + "time": "2022-04-25T19:31:17+00:00" }, { "name": "nette/schema", @@ -2491,16 +2495,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.2", + "version": "v0.11.3", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514" + "reference": "6833626ee48ef9bcc8aca8f9f166760441c12573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/7f7da640d68b9c9fec819caae7c744a213df6514", - "reference": "7f7da640d68b9c9fec819caae7c744a213df6514", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/6833626ee48ef9bcc8aca8f9f166760441c12573", + "reference": "6833626ee48ef9bcc8aca8f9f166760441c12573", "shasum": "" }, "require": { @@ -2515,15 +2519,13 @@ "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "hoa/console": "3.17.05.02" + "bamarni/composer-bin-plugin": "^1.2" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", - "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." }, "bin": [ "bin/psysh" @@ -2563,9 +2565,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.2" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.3" }, - "time": "2022-02-28T15:28:54+00:00" + "time": "2022-05-05T02:19:43+00:00" }, { "name": "ralouphie/getallheaders", @@ -2692,25 +2694,24 @@ }, { "name": "ramsey/uuid", - "version": "4.2.3", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", - "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", + "reference": "8505afd4fea63b81a85d3b7b53ac3cb8dc347c28", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", + "ext-ctype": "*", "ext-json": "*", - "php": "^7.2 || ^8.0", - "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php80": "^1.14" + "php": "^8.0", + "ramsey/collection": "^1.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -2747,9 +2748,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "4.x-dev" - }, "captainhook": { "force-install": true } @@ -2774,7 +2772,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.3" + "source": "https://github.com/ramsey/uuid/tree/4.3.1" }, "funding": [ { @@ -2786,20 +2784,20 @@ "type": "tidelift" } ], - "time": "2021-09-25T23:10:38+00:00" + "time": "2022-03-27T21:42:02+00:00" }, { "name": "symfony/console", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1" + "reference": "0d00aa289215353aa8746a31d101f8e60826285c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3bebf4108b9e07492a2a4057d207aa5a77d146b1", - "reference": "3bebf4108b9e07492a2a4057d207aa5a77d146b1", + "url": "https://api.github.com/repos/symfony/console/zipball/0d00aa289215353aa8746a31d101f8e60826285c", + "reference": "0d00aa289215353aa8746a31d101f8e60826285c", "shasum": "" }, "require": { @@ -2865,7 +2863,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.0.5" + "source": "https://github.com/symfony/console/tree/v6.0.8" }, "funding": [ { @@ -2881,7 +2879,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T10:48:52+00:00" + "time": "2022-04-20T15:01:42+00:00" }, { "name": "symfony/css-selector", @@ -2950,16 +2948,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", - "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { @@ -2997,7 +2995,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.1" }, "funding": [ { @@ -3013,20 +3011,20 @@ "type": "tidelift" } ], - "time": "2021-11-01T23:48:49+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/error-handler", - "version": "v6.0.3", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "20343b3bad7ebafa38138ddcb97290a24722b57b" + "reference": "5e2795163acbd13b3cd46835c9f8f6c5d0a3a280" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/20343b3bad7ebafa38138ddcb97290a24722b57b", - "reference": "20343b3bad7ebafa38138ddcb97290a24722b57b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/5e2795163acbd13b3cd46835c9f8f6c5d0a3a280", + "reference": "5e2795163acbd13b3cd46835c9f8f6c5d0a3a280", "shasum": "" }, "require": { @@ -3068,7 +3066,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.0.3" + "source": "https://github.com/symfony/error-handler/tree/v6.0.8" }, "funding": [ { @@ -3084,7 +3082,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-04-12T16:11:42+00:00" }, { "name": "symfony/event-dispatcher", @@ -3171,16 +3169,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "aa5422287b75594b90ee9cd807caf8f0df491385" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/aa5422287b75594b90ee9cd807caf8f0df491385", - "reference": "aa5422287b75594b90ee9cd807caf8f0df491385", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { @@ -3230,7 +3228,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.1" }, "funding": [ { @@ -3246,20 +3244,20 @@ "type": "tidelift" } ], - "time": "2021-07-15T12:33:35+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/finder", - "version": "v6.0.3", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430" + "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430", - "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430", + "url": "https://api.github.com/repos/symfony/finder/zipball/af7edab28d17caecd1f40a9219fc646ae751c21f", + "reference": "af7edab28d17caecd1f40a9219fc646ae751c21f", "shasum": "" }, "require": { @@ -3291,7 +3289,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.0.3" + "source": "https://github.com/symfony/finder/tree/v6.0.8" }, "funding": [ { @@ -3307,20 +3305,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T17:23:29+00:00" + "time": "2022-04-15T08:07:58+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b460fb15905eef449c4c43a4f0c113eccee103b9" + "reference": "c9c86b02d7ef6f44f3154acc7de42831518afe7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b460fb15905eef449c4c43a4f0c113eccee103b9", - "reference": "b460fb15905eef449c4c43a4f0c113eccee103b9", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c9c86b02d7ef6f44f3154acc7de42831518afe7c", + "reference": "c9c86b02d7ef6f44f3154acc7de42831518afe7c", "shasum": "" }, "require": { @@ -3363,7 +3361,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.0.5" + "source": "https://github.com/symfony/http-foundation/tree/v6.0.8" }, "funding": [ { @@ -3379,20 +3377,20 @@ "type": "tidelift" } ], - "time": "2022-02-21T17:15:17+00:00" + "time": "2022-04-22T08:18:02+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "5ad3f5e5fa772a8b5c6bb217f8379b533afac2ba" + "reference": "7aaf1cdc9cc2ad47e926f624efcb679883a39ca7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5ad3f5e5fa772a8b5c6bb217f8379b533afac2ba", - "reference": "5ad3f5e5fa772a8b5c6bb217f8379b533afac2ba", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/7aaf1cdc9cc2ad47e926f624efcb679883a39ca7", + "reference": "7aaf1cdc9cc2ad47e926f624efcb679883a39ca7", "shasum": "" }, "require": { @@ -3472,7 +3470,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.0.5" + "source": "https://github.com/symfony/http-kernel/tree/v6.0.8" }, "funding": [ { @@ -3488,20 +3486,20 @@ "type": "tidelift" } ], - "time": "2022-02-28T08:05:03+00:00" + "time": "2022-04-27T17:26:02+00:00" }, { "name": "symfony/mailer", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "0f4772db6521a1beb44529aa2c0c1e56f671be8f" + "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/0f4772db6521a1beb44529aa2c0c1e56f671be8f", - "reference": "0f4772db6521a1beb44529aa2c0c1e56f671be8f", + "url": "https://api.github.com/repos/symfony/mailer/zipball/706af6b3e99ebcbc639c9c664f5579aaa869409b", + "reference": "706af6b3e99ebcbc639c9c664f5579aaa869409b", "shasum": "" }, "require": { @@ -3546,7 +3544,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.0.5" + "source": "https://github.com/symfony/mailer/tree/v6.0.8" }, "funding": [ { @@ -3562,20 +3560,20 @@ "type": "tidelift" } ], - "time": "2022-02-25T10:48:52+00:00" + "time": "2022-04-27T17:10:30+00:00" }, { "name": "symfony/mime", - "version": "v6.0.3", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a" + "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/2cd9601efd040e56f43360daa68f3c6b0534923a", - "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a", + "url": "https://api.github.com/repos/symfony/mime/zipball/c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", + "reference": "c1701e88ad0ca49fc6ad6cdf360bc0e1209fb5e1", "shasum": "" }, "require": { @@ -3627,7 +3625,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.0.3" + "source": "https://github.com/symfony/mime/tree/v6.0.8" }, "funding": [ { @@ -3643,11 +3641,11 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-04-12T16:11:42+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -3709,7 +3707,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -3729,7 +3727,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -3790,7 +3788,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.25.0" }, "funding": [ { @@ -3810,7 +3808,7 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", @@ -3877,7 +3875,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.25.0" }, "funding": [ { @@ -3897,7 +3895,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3961,7 +3959,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.25.0" }, "funding": [ { @@ -3981,7 +3979,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4044,7 +4042,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -4064,7 +4062,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -4120,7 +4118,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.25.0" }, "funding": [ { @@ -4140,16 +4138,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -4203,7 +4201,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -4219,11 +4217,11 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -4282,7 +4280,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" }, "funding": [ { @@ -4302,16 +4300,16 @@ }, { "name": "symfony/process", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1ccceccc6497e96f4f646218f04b97ae7d9fa7a1" + "reference": "d074154ea8b1443a96391f6e39f9e547b2dd01b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1ccceccc6497e96f4f646218f04b97ae7d9fa7a1", - "reference": "1ccceccc6497e96f4f646218f04b97ae7d9fa7a1", + "url": "https://api.github.com/repos/symfony/process/zipball/d074154ea8b1443a96391f6e39f9e547b2dd01b9", + "reference": "d074154ea8b1443a96391f6e39f9e547b2dd01b9", "shasum": "" }, "require": { @@ -4343,7 +4341,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.0.5" + "source": "https://github.com/symfony/process/tree/v6.0.8" }, "funding": [ { @@ -4359,20 +4357,20 @@ "type": "tidelift" } ], - "time": "2022-01-30T18:19:12+00:00" + "time": "2022-04-12T16:11:42+00:00" }, { "name": "symfony/routing", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a738b152426ac7fcb94bdab8188264652238bef1" + "reference": "74c40c9fc334acc601a32fcf4274e74fb3bac11e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a738b152426ac7fcb94bdab8188264652238bef1", - "reference": "a738b152426ac7fcb94bdab8188264652238bef1", + "url": "https://api.github.com/repos/symfony/routing/zipball/74c40c9fc334acc601a32fcf4274e74fb3bac11e", + "reference": "74c40c9fc334acc601a32fcf4274e74fb3bac11e", "shasum": "" }, "require": { @@ -4431,7 +4429,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.0.5" + "source": "https://github.com/symfony/routing/tree/v6.0.8" }, "funding": [ { @@ -4447,20 +4445,20 @@ "type": "tidelift" } ], - "time": "2022-01-31T19:46:53+00:00" + "time": "2022-04-22T08:18:02+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", - "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", "shasum": "" }, "require": { @@ -4513,7 +4511,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" }, "funding": [ { @@ -4529,20 +4527,20 @@ "type": "tidelift" } ], - "time": "2021-11-04T17:53:12+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { "name": "symfony/string", - "version": "v6.0.3", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2" + "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/522144f0c4c004c80d56fa47e40e17028e2eefc2", - "reference": "522144f0c4c004c80d56fa47e40e17028e2eefc2", + "url": "https://api.github.com/repos/symfony/string/zipball/ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", + "reference": "ac0aa5c2282e0de624c175b68d13f2c8f2e2649d", "shasum": "" }, "require": { @@ -4598,7 +4596,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.3" + "source": "https://github.com/symfony/string/tree/v6.0.8" }, "funding": [ { @@ -4614,20 +4612,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-04-22T08:18:02+00:00" }, { "name": "symfony/translation", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875" + "reference": "3d38cf8f8834148c4457681d539bc204de701501" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e69501c71107cc3146b32aaa45f4edd0c3427875", - "reference": "e69501c71107cc3146b32aaa45f4edd0c3427875", + "url": "https://api.github.com/repos/symfony/translation/zipball/3d38cf8f8834148c4457681d539bc204de701501", + "reference": "3d38cf8f8834148c4457681d539bc204de701501", "shasum": "" }, "require": { @@ -4693,7 +4691,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.5" + "source": "https://github.com/symfony/translation/tree/v6.0.8" }, "funding": [ { @@ -4709,20 +4707,20 @@ "type": "tidelift" } ], - "time": "2022-02-09T15:52:48+00:00" + "time": "2022-04-22T08:18:02+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77" + "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", - "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", + "reference": "c4183fc3ef0f0510893cbeedc7718fb5cafc9ac9", "shasum": "" }, "require": { @@ -4771,7 +4769,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0" + "source": "https://github.com/symfony/translation-contracts/tree/v3.0.1" }, "funding": [ { @@ -4787,20 +4785,20 @@ "type": "tidelift" } ], - "time": "2021-09-07T12:43:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.0.5", + "version": "v6.0.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce" + "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60d6a756d5f485df5e6e40b337334848f79f61ce", - "reference": "60d6a756d5f485df5e6e40b337334848f79f61ce", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/fa61dfb4bd3068df2492013dc65f3190e9f550c0", + "reference": "fa61dfb4bd3068df2492013dc65f3190e9f550c0", "shasum": "" }, "require": { @@ -4859,7 +4857,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.0.5" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.8" }, "funding": [ { @@ -4875,7 +4873,7 @@ "type": "tidelift" } ], - "time": "2022-02-21T17:15:17+00:00" + "time": "2022-04-26T13:22:23+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5012,16 +5010,16 @@ }, { "name": "voku/portable-ascii", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89" + "reference": "b56450eed252f6801410d810c8e1727224ae0743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/9bd89e83cecdf8c37b64909454249eaed98b2c89", - "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", "shasum": "" }, "require": { @@ -5058,7 +5056,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.0" + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" }, "funding": [ { @@ -5082,7 +5080,7 @@ "type": "tidelift" } ], - "time": "2022-01-24T18:59:03+00:00" + "time": "2022-03-08T17:03:00+00:00" }, { "name": "webmozart/assert", @@ -5222,16 +5220,16 @@ }, { "name": "composer/composer", - "version": "dev-main", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "ae23647f07932754dc9d7fd1d15657273301a009" + "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/ae23647f07932754dc9d7fd1d15657273301a009", - "reference": "ae23647f07932754dc9d7fd1d15657273301a009", + "url": "https://api.github.com/repos/composer/composer/zipball/50c47b1f907cfcdb8f072b88164d22b527557ae1", + "reference": "50c47b1f907cfcdb8f072b88164d22b527557ae1", "shasum": "" }, "require": { @@ -5267,7 +5265,6 @@ "ext-zip": "Enabling the zip extension allows you to unzip archives", "ext-zlib": "Allow gzip compression of HTTP requests" }, - "default-branch": true, "bin": [ "bin/composer" ], @@ -5308,7 +5305,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/main" + "source": "https://github.com/composer/composer/tree/2.3.5" }, "funding": [ { @@ -5324,7 +5321,7 @@ "type": "tidelift" } ], - "time": "2022-03-09T19:45:19+00:00" + "time": "2022-04-13T14:43:00+00:00" }, { "name": "composer/metadata-minifier", @@ -5468,16 +5465,16 @@ }, { "name": "composer/semver", - "version": "3.2.9", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/a951f614bd64dcd26137bc9b7b2637ddcfc57649", - "reference": "a951f614bd64dcd26137bc9b7b2637ddcfc57649", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { @@ -5529,7 +5526,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.9" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -5545,7 +5542,7 @@ "type": "tidelift" } ], - "time": "2022-02-04T13:58:43+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/spdx-licenses", @@ -6007,16 +6004,16 @@ }, { "name": "justinrainbow/json-schema", - "version": "5.2.11", + "version": "5.2.12", "source": { "type": "git", "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", "shasum": "" }, "require": { @@ -6071,22 +6068,22 @@ ], "support": { "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" }, - "time": "2021-07-22T09:24:00+00:00" + "time": "2022-04-13T08:02:27+00:00" }, { "name": "laravel/sail", - "version": "v1.13.5", + "version": "v1.14.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "aeb6eeb55b22c328d2f301145b97288127691d48" + "reference": "9a7348dedfccc894718a21f71c09d669747e3f33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/aeb6eeb55b22c328d2f301145b97288127691d48", - "reference": "aeb6eeb55b22c328d2f301145b97288127691d48", + "url": "https://api.github.com/repos/laravel/sail/zipball/9a7348dedfccc894718a21f71c09d669747e3f33", + "reference": "9a7348dedfccc894718a21f71c09d669747e3f33", "shasum": "" }, "require": { @@ -6133,7 +6130,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-02-17T19:59:03+00:00" + "time": "2022-05-02T13:58:40+00:00" }, { "name": "mockery/mockery", @@ -6268,16 +6265,16 @@ }, { "name": "nunomaduro/collision", - "version": "v6.1.0", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "df09e21a5e5d5a7d51a8b9ecd44d3dd150d97fec" + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/df09e21a5e5d5a7d51a8b9ecd44d3dd150d97fec", - "reference": "df09e21a5e5d5a7d51a8b9ecd44d3dd150d97fec", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/c379636dc50e829edb3a8bcb944a01aa1aed8f25", + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25", "shasum": "" }, "require": { @@ -6288,10 +6285,10 @@ }, "require-dev": { "brianium/paratest": "^6.4.1", - "laravel/framework": "^9.0", + "laravel/framework": "^9.7", "nunomaduro/larastan": "^1.0.2", "nunomaduro/mock-final-classes": "^1.1.0", - "orchestra/testbench": "^7.0.0", + "orchestra/testbench": "^7.3.0", "phpunit/phpunit": "^9.5.11" }, "type": "library", @@ -6351,7 +6348,7 @@ "type": "patreon" } ], - "time": "2022-01-18T17:49:08+00:00" + "time": "2022-04-05T15:31:38+00:00" }, { "name": "nunomaduro/larastan", @@ -6673,16 +6670,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -6717,9 +6714,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpspec/prophecy", @@ -6790,20 +6787,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.4.9", + "version": "1.6.7", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "1a45f44d319cf000a8c960af6b7435741e944771" + "reference": "d41c39cb2e487663bce9bbd97c660e244b73abad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1a45f44d319cf000a8c960af6b7435741e944771", - "reference": "1a45f44d319cf000a8c960af6b7435741e944771", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d41c39cb2e487663bce9bbd97c660e244b73abad", + "reference": "d41c39cb2e487663bce9bbd97c660e244b73abad", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -6813,11 +6810,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -6830,7 +6822,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.4.9" + "source": "https://github.com/phpstan/phpstan/tree/1.6.7" }, "funding": [ { @@ -6850,20 +6842,20 @@ "type": "tidelift" } ], - "time": "2022-03-10T08:52:08+00:00" + "time": "2022-05-04T22:55:41+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.14", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9f4d60b6afe5546421462b76cd4e633ebc364ab4" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f4d60b6afe5546421462b76cd4e633ebc364ab4", - "reference": "9f4d60b6afe5546421462b76cd4e633ebc364ab4", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -6919,7 +6911,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.14" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -6927,7 +6919,7 @@ "type": "github" } ], - "time": "2022-02-28T12:38:02+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -7172,16 +7164,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.16", + "version": "9.5.20", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", - "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", + "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", "shasum": "" }, "require": { @@ -7211,7 +7203,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.0", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -7259,7 +7251,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" }, "funding": [ { @@ -7271,7 +7263,7 @@ "type": "github" } ], - "time": "2022-02-23T17:10:58+00:00" + "time": "2022-04-01T12:37:26+00:00" }, { "name": "react/promise", @@ -7715,16 +7707,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -7766,7 +7758,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -7774,7 +7766,7 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", @@ -8206,28 +8198,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -8250,7 +8242,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" }, "funding": [ { @@ -8258,7 +8250,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", @@ -8315,23 +8307,24 @@ }, { "name": "seld/jsonlint", - "version": "1.8.3", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + "reference": "4211420d25eba80712bff236a98960ef68b866b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", + "reference": "4211420d25eba80712bff236a98960ef68b866b7", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ "bin/jsonlint" @@ -8362,7 +8355,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" }, "funding": [ { @@ -8374,7 +8367,7 @@ "type": "tidelift" } ], - "time": "2020-11-11T09:19:24+00:00" + "time": "2022-04-01T13:37:23+00:00" }, { "name": "seld/phar-utils", @@ -8488,16 +8481,16 @@ }, { "name": "spatie/flare-client-php", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "8ada1e5f4d7a2869f491c5e75d1f689b69db423e" + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/8ada1e5f4d7a2869f491c5e75d1f689b69db423e", - "reference": "8ada1e5f4d7a2869f491c5e75d1f689b69db423e", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/ceab058852a1278d9f57a7b95f1c348e4956d866", + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866", "shasum": "" }, "require": { @@ -8540,7 +8533,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.0.5" + "source": "https://github.com/spatie/flare-client-php/tree/1.1.0" }, "funding": [ { @@ -8548,20 +8541,20 @@ "type": "github" } ], - "time": "2022-03-01T10:52:59+00:00" + "time": "2022-03-11T13:21:28+00:00" }, { "name": "spatie/ignition", - "version": "1.1.1", + "version": "1.2.9", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "5c554067887b7080bc58977fa30a488624d85d20" + "reference": "db25202fab2d5c14613b8914a1bb374998bbf870" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/5c554067887b7080bc58977fa30a488624d85d20", - "reference": "5c554067887b7080bc58977fa30a488624d85d20", + "url": "https://api.github.com/repos/spatie/ignition/zipball/db25202fab2d5c14613b8914a1bb374998bbf870", + "reference": "db25202fab2d5c14613b8914a1bb374998bbf870", "shasum": "" }, "require": { @@ -8569,7 +8562,7 @@ "ext-mbstring": "*", "monolog/monolog": "^2.0", "php": "^8.0", - "spatie/flare-client-php": "^1.0", + "spatie/flare-client-php": "^1.1", "symfony/console": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, @@ -8579,7 +8572,6 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "spatie/ray": "^1.32", "symfony/process": "^5.4|^6.0" }, "type": "library", @@ -8619,20 +8611,20 @@ "type": "github" } ], - "time": "2022-03-02T10:51:55+00:00" + "time": "2022-04-23T20:37:21+00:00" }, { "name": "spatie/laravel-ignition", - "version": "1.0.6", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "d349854331789aba9205fd755e0c1d1934ef1463" + "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/d349854331789aba9205fd755e0c1d1934ef1463", - "reference": "d349854331789aba9205fd755e0c1d1934ef1463", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/51e5daaa7e43c154fe57f1ddfbba862f9fe57646", + "reference": "51e5daaa7e43c154fe57f1ddfbba862f9fe57646", "shasum": "" }, "require": { @@ -8643,7 +8635,7 @@ "monolog/monolog": "^2.3", "php": "^8.0", "spatie/flare-client-php": "^1.0.1", - "spatie/ignition": "^1.0", + "spatie/ignition": "^1.2.4", "symfony/console": "^5.0|^6.0", "symfony/var-dumper": "^5.0|^6.0" }, @@ -8671,6 +8663,9 @@ } }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { "Spatie\\LaravelIgnition\\": "src" } @@ -8706,20 +8701,20 @@ "type": "github" } ], - "time": "2022-02-15T11:02:15+00:00" + "time": "2022-05-05T15:53:24+00:00" }, { "name": "symfony/filesystem", - "version": "v6.0.6", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "52b888523545b0b4049ab9ce48766802484d7046" + "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b888523545b0b4049ab9ce48766802484d7046", - "reference": "52b888523545b0b4049ab9ce48766802484d7046", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", + "reference": "6c9e4c41f2c51dfde3db298594ed9cba55dbf5ff", "shasum": "" }, "require": { @@ -8753,7 +8748,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.6" + "source": "https://github.com/symfony/filesystem/tree/v6.0.7" }, "funding": [ { @@ -8769,7 +8764,7 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:58:14+00:00" + "time": "2022-04-01T12:54:51+00:00" }, { "name": "symfony/polyfill-php73", diff --git a/database/factories/SquidAllowedIpFactory.php b/database/factories/SquidAllowedIpFactory.php new file mode 100644 index 0000000..4220732 --- /dev/null +++ b/database/factories/SquidAllowedIpFactory.php @@ -0,0 +1,23 @@ + + */ +class SquidAllowedIpFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + 'ip'=>$this->faker->ipv4 + ]; + } +} diff --git a/database/seeders/CreateAdministratorSeeder.php b/database/seeders/CreateAdministratorSeeder.php index 192a5ab..69e236a 100644 --- a/database/seeders/CreateAdministratorSeeder.php +++ b/database/seeders/CreateAdministratorSeeder.php @@ -17,13 +17,12 @@ class CreateAdministratorSeeder extends Seeder */ public function run() { + $email = 'administrator'.date('Ymd').'@example.com'; $password = Str::random(30); - echo $password.PHP_EOL; - $aUser = new User(); $aUser->fill([ 'name'=>'administrator', - 'email'=>'administrator@example.com', + 'email'=>$email, 'password'=>Hash::make($password), 'is_administrator'=>1, ]); @@ -31,7 +30,8 @@ public function run() $user = Auth::loginUsingId($aUser->id); $token = $user->createToken('token1'); - dd($token); - + echo "Email: ".$email.PHP_EOL; + echo "Password: ".$password.PHP_EOL; + echo "Token: ".$token->plainTextToken.PHP_EOL; } } diff --git a/package.json b/package.json index 7a9aecd..7b71681 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,13 @@ "production": "mix --production" }, "devDependencies": { + "@popperjs/core": "^2.10.2", "axios": "^0.25", + "bootstrap": "^5.1.3", "laravel-mix": "^6.0.6", "lodash": "^4.17.19", - "postcss": "^8.1.14" + "postcss": "^8.1.14", + "sass": "^1.32.11", + "sass-loader": "^11.0.1" } } diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js index 6922577..dcdc4df 100644 --- a/resources/js/bootstrap.js +++ b/resources/js/bootstrap.js @@ -1,5 +1,9 @@ window._ = require('lodash'); +try { + require('bootstrap'); +} catch (e) {} + /** * We'll load the axios HTTP library which allows us to easily issue requests * to our Laravel back-end. This library automatically handles sending the diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss new file mode 100644 index 0000000..172daaa --- /dev/null +++ b/resources/sass/_variables.scss @@ -0,0 +1,7 @@ +// Body +$body-bg: #f8fafc; + +// Typography +$font-family-sans-serif: 'Nunito', sans-serif; +$font-size-base: 0.9rem; +$line-height-base: 1.6; diff --git a/resources/sass/app.scss b/resources/sass/app.scss new file mode 100644 index 0000000..3193ffa --- /dev/null +++ b/resources/sass/app.scss @@ -0,0 +1,8 @@ +// Fonts +@import url('https://fonts.googleapis.com/css?family=Nunito'); + +// Variables +@import 'variables'; + +// Bootstrap +@import '~bootstrap/scss/bootstrap'; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php new file mode 100644 index 0000000..ea9ac94 --- /dev/null +++ b/resources/views/auth/login.blade.php @@ -0,0 +1,73 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Login') }}
+ +
+
+ @csrf + +
+ + +
+ + + @error('email') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ + + @error('password') + + {{ $message }} + + @enderror +
+
+ +
+
+
+ + + +
+
+
+ +
+
+ + + @if (Route::has('password.request')) + + {{ __('Forgot Your Password?') }} + + @endif +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/passwords/confirm.blade.php b/resources/views/auth/passwords/confirm.blade.php new file mode 100644 index 0000000..f8c8e61 --- /dev/null +++ b/resources/views/auth/passwords/confirm.blade.php @@ -0,0 +1,49 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Confirm Password') }}
+ +
+ {{ __('Please confirm your password before continuing.') }} + +
+ @csrf + +
+ + +
+ + + @error('password') + + {{ $message }} + + @enderror +
+
+ +
+
+ + + @if (Route::has('password.request')) + + {{ __('Forgot Your Password?') }} + + @endif +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php new file mode 100644 index 0000000..d1ac783 --- /dev/null +++ b/resources/views/auth/passwords/email.blade.php @@ -0,0 +1,47 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Reset Password') }}
+ +
+ @if (session('status')) + + @endif + +
+ @csrf + +
+ + +
+ + + @error('email') + + {{ $message }} + + @enderror +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php new file mode 100644 index 0000000..dccf6c6 --- /dev/null +++ b/resources/views/auth/passwords/reset.blade.php @@ -0,0 +1,65 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Reset Password') }}
+ +
+
+ @csrf + + + +
+ + +
+ + + @error('email') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ + + @error('password') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php new file mode 100644 index 0000000..12cad1a --- /dev/null +++ b/resources/views/auth/register.blade.php @@ -0,0 +1,77 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Register') }}
+ +
+
+ @csrf + +
+ + +
+ + + @error('name') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ + + @error('email') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ + + @error('password') + + {{ $message }} + + @enderror +
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/auth/verify.blade.php b/resources/views/auth/verify.blade.php new file mode 100644 index 0000000..9f8c1bc --- /dev/null +++ b/resources/views/auth/verify.blade.php @@ -0,0 +1,28 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Verify Your Email Address') }}
+ +
+ @if (session('resent')) + + @endif + + {{ __('Before proceeding, please check your email for a verification link.') }} + {{ __('If you did not receive the email') }}, +
+ @csrf + . +
+
+
+
+
+
+@endsection diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php new file mode 100644 index 0000000..1f34466 --- /dev/null +++ b/resources/views/home.blade.php @@ -0,0 +1,23 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Dashboard') }}
+ +
+ @if (session('status')) + + @endif + + {{ __('You are logged in!') }} +
+
+
+
+
+@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php new file mode 100644 index 0000000..90d59e6 --- /dev/null +++ b/resources/views/layouts/app.blade.php @@ -0,0 +1,112 @@ + + + + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + + + + + + + + + +
+ + +
+ @yield('content') +
+ + + +
+ + + + + diff --git a/resources/views/squidallowedips/creator.blade.php b/resources/views/squidallowedips/creator.blade.php new file mode 100644 index 0000000..ed62286 --- /dev/null +++ b/resources/views/squidallowedips/creator.blade.php @@ -0,0 +1,28 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Add AllowedIP') }}
+ +
+ +
+
+ + +
+ + + + @csrf +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/squidallowedips/search.blade.php b/resources/views/squidallowedips/search.blade.php new file mode 100644 index 0000000..db51f32 --- /dev/null +++ b/resources/views/squidallowedips/search.blade.php @@ -0,0 +1,49 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Search AllowedIPs') }}
+
+ + {{ __('Add AllowedIPs') }} + + + @can('create-user') + + + @endcan + + + + + + @foreach($ips as $ip) + + @can('create-user') + + + @endcan + + + + @endforeach + + + +
{{ __('Id') }}{{ __('UserId') }}{{ __('IP') }}{{ __('Actions') }}
{{ $ip->id }}{{ $ip->user_id }}{{{ $ip->ip }}} +
+ + @csrf +
+
+ + {{ $ips->links() }} +
+
+
+
+
+@endsection diff --git a/resources/views/squidusers/commons/form.blade.php b/resources/views/squidusers/commons/form.blade.php new file mode 100644 index 0000000..ebe965e --- /dev/null +++ b/resources/views/squidusers/commons/form.blade.php @@ -0,0 +1,25 @@ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + + diff --git a/resources/views/squidusers/creator.blade.php b/resources/views/squidusers/creator.blade.php new file mode 100644 index 0000000..2e09d47 --- /dev/null +++ b/resources/views/squidusers/creator.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Create SquidUser') }}
+ +
+ +
+ @include('squidusers.commons.form',['submit'=>'Create']) + @csrf +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/squidusers/editor.blade.php b/resources/views/squidusers/editor.blade.php new file mode 100644 index 0000000..727169f --- /dev/null +++ b/resources/views/squidusers/editor.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Modify User') }}
+ +
+ +
+ @include('squidusers.commons.form',['submit'=>'Modify']) + @csrf +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/squidusers/search.blade.php b/resources/views/squidusers/search.blade.php new file mode 100644 index 0000000..c612992 --- /dev/null +++ b/resources/views/squidusers/search.blade.php @@ -0,0 +1,57 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Search SquidUsers') }}
+
+ + Create SquidUser + + + + + + + + + + + + + @foreach($users as $user) + + + + + + + + + + @endforeach + + + +
{{ __('Id') }}{{ __('UserId') }}{{ __('User') }}{{ __('Enabled') }}{{ __('FullName') }}{{ __('Comment') }}{{ __('Actions') }}
{{ $user->id }}{{{ $user->user_id }}}{{{ $user->user }}} + @if($user->enabled == 1) + {{ __('Enabled') }} + @else + {{ __('Disabled') }} + @endif + {{ $user->fullname }}{{ $user->comment }} +
+ + @csrf +
+
+ + {{ $users->links() }} +
+
+
+
+
+@endsection diff --git a/resources/views/users/commons/form.blade.php b/resources/views/users/commons/form.blade.php new file mode 100644 index 0000000..9a9363c --- /dev/null +++ b/resources/views/users/commons/form.blade.php @@ -0,0 +1,14 @@ +
+ + +
+
+ + +
+
+ + +
+ + diff --git a/resources/views/users/creator.blade.php b/resources/views/users/creator.blade.php new file mode 100644 index 0000000..6f902a6 --- /dev/null +++ b/resources/views/users/creator.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Create User') }}
+ +
+ +
+ @include('users.commons.form',['submit'=>'Create']) + @csrf +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/users/editor.blade.php b/resources/views/users/editor.blade.php new file mode 100644 index 0000000..fb0a17f --- /dev/null +++ b/resources/views/users/editor.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Modify User') }}
+ +
+ +
+ @include('users.commons.form',['submit'=>'Modify']) + @csrf +
+ +
+
+
+
+
+@endsection diff --git a/resources/views/users/search.blade.php b/resources/views/users/search.blade.php new file mode 100644 index 0000000..cb8a147 --- /dev/null +++ b/resources/views/users/search.blade.php @@ -0,0 +1,53 @@ +@extends('layouts.app') + +@section('content') +
+
+
+
+
{{ __('Search Users') }}
+
+ + Create User + + + + + + + + + + + @foreach($users as $user) + + + + + + + + @endforeach + + + +
{{ __('Id') }}{{ __('Name') }}{{ __('Email') }}{{ __('Options') }}{{ __('Actions') }}
{{ $user->id }}{{{ $user->name }}} + {{ $user->email }} + + @if($user->is_administrator == 1) + {{ __('Admin') }} + @endif + +
+ + @csrf +
+
+ + {{ $users->links() }} +
+
+
+
+
+@endsection diff --git a/routes/api.php b/routes/api.php index 955b854..32deff4 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,7 +2,9 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; - +use App\Http\Controllers\Api\UserController; +use App\Http\Controllers\Api\SquidUserController; +use App\Http\Controllers\Api\SquidAllowedIpController; /* |-------------------------------------------------------------------------- | API Routes @@ -21,17 +23,24 @@ Route::group(['middleware' => 'auth:sanctum'], function() { Route::group(['prefix'=>'user'],function(){ - Route::post('create',[\App\Http\Controllers\Api\UserController::class,'create']); - Route::post('modify/{id}',[\App\Http\Controllers\Api\UserController::class,'modify']); - Route::post('destroy/{id}',[\App\Http\Controllers\Api\UserController::class,'destroy']); - Route::get('search',[\App\Http\Controllers\Api\UserController::class,'search']); + Route::post('create',[UserController::class,'create']); + Route::post('modify/{id}',[UserController::class,'modify']); + Route::post('destroy/{id}',[UserController::class,'destroy']); + Route::get('search',[UserController::class,'search']); }); Route::group(['prefix'=>'squiduser'],function(){ - Route::post('create/to_specified_user/{user_id}',[\App\Http\Controllers\Api\SquidUserController::class,'create']); - Route::post('modify/{id}',[\App\Http\Controllers\Api\SquidUserController::class,'modify']); - Route::post('destroy/{id}',[\App\Http\Controllers\Api\SquidUserController::class,'destroy']); - Route::get('search/to_specified_user/{user_id}',[\App\Http\Controllers\Api\SquidUserController::class,'search']); + Route::post('create/to_specified_user/{user_id}',[SquidUserController::class,'create']); + Route::post('modify/{id}',[SquidUserController::class,'modify']); + Route::post('destroy/{id}',[SquidUserController::class,'destroy']); + Route::get('search/to_specified_user/{user_id}',[SquidUserController::class,'search']); + }); + + Route::group(['prefix'=>'squidallowedip'],function(){ + Route::post('create/to_specified_user/{user_id}',[SquidAllowedIpController::class,'create']); + Route::post('modify/{id}',[SquidAllowedIpController::class,'modify']); + Route::post('destroy/{id}',[SquidAllowedIpController::class,'destroy']); + Route::get('search/to_specified_user/{user_id}',[SquidAllowedIpController::class,'search']); }); }); diff --git a/routes/web.php b/routes/web.php index b130397..8152f02 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,7 +1,9 @@ route('login'); }); + +Auth::routes([ + 'register'=>false +]); + +Route::group(['middleware' => 'auth:web'], function() +{ + Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); + Route::group(['prefix'=>'user'],function(){ + Route::post('create',[UserController::class,'create'])->name('user.create'); + Route::post('modify/{id}',[UserController::class,'modify'])->name('user.modify'); + Route::post('destroy/{id}',[UserController::class,'destroy'])->name('user.destroy'); + Route::get('search',[UserController::class,'search'])->name('user.search'); + Route::get('creator',[UserController::class,'creator'])->name('user.creator'); + Route::get('editor/{id}',[UserController::class,'editor'])->name('user.editor'); + }); + Route::group(['prefix'=>'squidallowedip'],function(){ + Route::get('search/to_specified_user/{user_id}',[SquidAllowedIpController::class,'search'])->name('ip.search'); + Route::get('creator',[SquidAllowedIpController::class,'creator'])->name('ip.creator'); + Route::get('editor/{id}',[SquidAllowedIpController::class,'editor'])->name('ip.editor'); + Route::post('create/to_specified_user/{user_id}',[SquidAllowedIpController::class,'create'])->name('ip.create'); + Route::post('destroy/{id}',[SquidAllowedIpController::class,'destroy'])->name('ip.destroy'); + }); + Route::group(['prefix'=>'squiduser'],function(){ + Route::get('search/to_specified_user/{user_id}',[SquidUserController::class,'search'])->name('squiduser.search'); + Route::get('creator',[SquidUserController::class,'creator'])->name('squiduser.creator'); + Route::get('editor/{id}',[SquidUserController::class,'editor'])->name('squiduser.editor'); + Route::post('create/to_specified_user/{user_id}',[SquidUserController::class,'create'])->name('squiduser.create'); + Route::post('modify/{id}',[SquidUserController::class,'modify'])->name('squiduser.modify'); + Route::post('destroy/{id}',[SquidUserController::class,'destroy'])->name('squiduser.destroy'); + }); +}); + diff --git a/tests/Feature/Api/UserActionTest.php b/tests/Feature/Api/UserActionTest.php index 7028d89..e4de725 100644 --- a/tests/Feature/Api/UserActionTest.php +++ b/tests/Feature/Api/UserActionTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Api; +use App\Models\SquidAllowedIp; use App\Models\SquidUser; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; @@ -220,6 +221,45 @@ public function test_impossible_search_users_by_unprivileged_user(){ $response->assertStatus(403); } + public function test_can_create_squid_allowed_ip_own_by_unprivileged_user(){ + $response = $this->actingAs($this->user) + ->json('POST','api/squidallowedip/create/to_specified_user/'.$this->user->id,[ + 'ip'=>'1.1.1.1' + ]); + $response->assertStatus(201); + } + + public function test_can_create_squid_allowed_ip_to_other_user_by_administrator(){ + $response = $this->actingAs($this->admin) + ->json('POST','api/squidallowedip/create/to_specified_user/'.$this->user->id,[ + 'ip'=>'8.8.8.8' + ]); + $response->assertStatus(201); + } + + public function test_impossible_create_squid_allowed_ip_to_other_user_by_unprivileged_user(){ + $response = $this->actingAs($this->user) + ->json('POST','api/squidallowedip/create/to_specified_user/'.$this->admin->id,[ + 'ip'=>'127.0.0.1' + ]); + $response->assertStatus(403); + } + + public function test_can_search_squid_allowed_ip_own_by_unprivileged_user(){ + $response = $this->actingAs($this->user) + ->json('GET','api/squidallowedip/search/to_specified_user/'.$this->user->id,[]); + $response->assertStatus(200); + } + + public function test_can_destroy_squid_allowed_ip_own_by_unprivileged_user(){ + $ip = SquidAllowedIp::factory()->create([ + 'user_id'=>$this->user->id + ]); + $response = $this->actingAs($this->user) + ->json('POST','api/squidallowedip/destroy/'.$ip->id,[]); + $response->assertStatus(200); + } + private function createAdministrator(){ $user = new User(); $user->email = 'admin@example.com'; diff --git a/webpack.mix.js b/webpack.mix.js index 2a22dc1..1a2a958 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -6,12 +6,11 @@ const mix = require('laravel-mix'); |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps - | for your Laravel applications. By default, we are compiling the CSS + | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.js('resources/js/app.js', 'public/js') - .postCss('resources/css/app.css', 'public/css', [ - // - ]); + .sass('resources/sass/app.scss', 'public/css') + .sourceMaps();