diff --git a/README.md b/README.md index 50e85d4..8e8db71 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,13 @@ Many other features are currently planned for this app, such as: # Technical overview Tech stack: - - [Laravel 7](https://laravel.com/) - - Eloquent ORM - - AdminLTE / Bootstrap 4 - - jQuery / Plain Javascript - - vueJS (in the future) + - [Laravel 8](https://laravel.com/) + - [Eloquent ORM](https://laravel.com/docs/5.0/eloquent) + - [AdminLTE](https://adminlte.io/) / + - [Bootstrap 4](https://getbootstrap.com/docs/4.0/getting-started/introduction/) + - [jQuery](https://jquery.com/) + - [Bootstrap 4](https://getbootstrap.com/) + - [Icons by FontAwesome](https://fontawesome.com/) # Stability @@ -63,7 +65,7 @@ Tech stack: # Software Requirements - ``composer`` (min version: 1.8.4) - ``npm`` (tested w/ v 5.8.0) - - ``php`` (required PHP 7 or newer - lower versions unsupported!) + - ``php`` (required PHP 8 or newer - lower versions unsupported!) # PHP Extension Requirements diff --git a/composer.json b/composer.json index 2429304..5772df4 100755 --- a/composer.json +++ b/composer.json @@ -16,13 +16,15 @@ "fideloper/proxy": "^4.2", "fruitcake/laravel-cors": "^1.0", "geo-sot/laravel-env-editor": "^0.9.9", + "graham-campbell/markdown": "^13.1", + "guzzlehttp/guzzle": "^7.0.1", "jeroennoten/laravel-adminlte": "^3.2", "laravel/framework": "^8.0", "laravel/slack-notification-channel": "^2.0", "laravel/tinker": "^2.0", "laravel/ui": "^3.0", "mcamara/laravel-localization": "^1.5", - "mpociot/teamwork": "^6.0", + "mpociot/teamwork": "^6.1", "pragmarx/google2fa-laravel": "^1.3", "sentry/sentry-laravel": "2.9.0", "spatie/laravel-permission": "^3.13" @@ -51,7 +53,6 @@ "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } - }, "autoload-dev": { "psr-4": { diff --git a/composer.lock b/composer.lock index 7a17f9b..0fa9272 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c89391bfd2557bb2adbf7f31deda6b2d", + "content-hash": "39f6633d9207dd645f0d1935ee11c483", "packages": [ { "name": "almasaeed2010/adminlte", @@ -1934,16 +1934,16 @@ }, { "name": "laravel/framework", - "version": "v8.63.0", + "version": "v8.64.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8f3d280f36a427730c8c8fa34316c79eed38781e" + "reference": "3337c029e1bb31d9712d27437cc27010ba302c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8f3d280f36a427730c8c8fa34316c79eed38781e", - "reference": "8f3d280f36a427730c8c8fa34316c79eed38781e", + "url": "https://api.github.com/repos/laravel/framework/zipball/3337c029e1bb31d9712d27437cc27010ba302c9e", + "reference": "3337c029e1bb31d9712d27437cc27010ba302c9e", "shasum": "" }, "require": { @@ -2101,7 +2101,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-10-05T14:04:25+00:00" + "time": "2021-10-12T13:43:13+00:00" }, { "name": "laravel/serializable-closure", @@ -2775,6 +2775,68 @@ ], "time": "2021-10-01T21:08:31+00:00" }, + { + "name": "mpociot/teamwork", + "version": "6.1.2", + "source": { + "type": "git", + "url": "https://github.com/mpociot/teamwork.git", + "reference": "f306f97b424d382c129c0cc025229085f4a946fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpociot/teamwork/zipball/f306f97b424d382c129c0cc025229085f4a946fe", + "reference": "f306f97b424d382c129c0cc025229085f4a946fe", + "shasum": "" + }, + "require": { + "laravel/framework": "^6.0|^7.0|^8.0", + "php": "^7.2.5|^8.0" + }, + "require-dev": { + "doctrine/dbal": "^2.10", + "illuminate/database": "^6.0|^7.0|^8.0", + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^4.0|^5.0|^6.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Mpociot\\Teamwork\\TeamworkServiceProvider" + ], + "aliases": { + "Teamwork": "Mpociot\\Teamwork\\Facades\\Teamwork" + } + } + }, + "autoload": { + "psr-4": { + "Mpociot\\Teamwork\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcel Pociot", + "email": "m.pociot@gmail.com" + } + ], + "description": "User to Team associations for the Laravel 5 Framework", + "homepage": "http://github.com/mpociot/teamwork", + "keywords": [ + "Invite", + "Teams" + ], + "support": { + "issues": "https://github.com/mpociot/teamwork/issues", + "source": "https://github.com/mpociot/teamwork" + }, + "time": "2021-02-16T10:12:41+00:00" + }, { "name": "nesbot/carbon", "version": "2.53.1", @@ -10345,5 +10407,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index e761039..527e506 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -36,5 +36,6 @@ class DatabaseSeeder extends Seeder $this->call(\Database\Seeders\UserSeeder::class); $this->call(\Database\Seeders\DefaultOptionsSeeder::class); $this->call(\Database\Seeders\NewPermissions::class); + $this->call(\Database\Seeders\TeamSeeder::class); } } diff --git a/database/seeders/DefaultOptionsSeeder.php b/database/seeders/DefaultOptionsSeeder.php index 1940264..b4ed1ce 100644 --- a/database/seeders/DefaultOptionsSeeder.php +++ b/database/seeders/DefaultOptionsSeeder.php @@ -1,4 +1,25 @@ . + */ + + namespace Database\Seeders; use App\Facades\Options; @@ -13,16 +34,27 @@ class DefaultOptionsSeeder extends Seeder */ public function run() { - Options::setOption('notify_new_application_email', true, 'Notify when a new application comes through'); // done - Options::setOption('notify_application_comment', false, 'Notify when someone comments on an application'); // done - Options::setOption('notify_new_user', true, 'Notify when someone signs up'); // done - Options::setOption('notify_application_status_change', true, 'Notify when an application changes status'); // done - Options::setOption('notify_applicant_approved', true, 'Notify when an applicant is approved'); // done - Options::setOption('notify_vacancystatus_change', false, 'Notify when a vacancy\'s status changes'); // done + Options::setOption('notify_new_application_email', true, 'Notify when a new application comes through', 'notifications'); // done + Options::setOption('notify_application_comment', false, 'Notify when someone comments on an application', 'notifications'); // done + Options::setOption('notify_new_user', true, 'Notify when someone signs up', 'notifications'); // done + Options::setOption('notify_application_status_change', true, 'Notify when an application changes status', 'notifications'); // done + Options::setOption('notify_applicant_approved', true, 'Notify when an applicant is approved', 'notifications'); // done + Options::setOption('notify_vacancystatus_change', false, 'Notify when a vacancy\'s status changes', 'notifications'); // done - Options::setOption('enable_slack_notifications', true, 'Enable slack notifications'); - Options::setOption('enable_email_notifications', true, 'Enable e-mail notifications'); + // added in 0.6.2 + Options::setOption('pw_security_policy', 'low', 'Describes the current password security policy.', 'app_security'); + Options::setOption('graceperiod', 7, '2FA Grace Period', 'app_security'); + Options::setOption('password_expiry', '0', 'Defines wether passwords must be reset after $value', 'app_security'); + Options::setOption('force2fa', false, 'Defines whether 2fa is forced upon users', 'app_security'); + Options::setOption('force2faRole', 'reviewer', 'Defines which role to force 2fa for', 'app_security'); + Options::setOption('requireGameLicense', true, 'Defines whether people need to validate their game license', 'app_security'); + + Options::setOption('currentGame', 'MINECRAFT', 'Defines what game we\'re working with', 'app_integration'); + + + Options::setOption('enable_slack_notifications', true, 'Enable slack notifications', 'notifications'); + Options::setOption('enable_email_notifications', true, 'Enable e-mail notifications', 'notifications'); } } diff --git a/database/seeders/NewPermissions.php b/database/seeders/NewPermissions.php index e643631..6c3f118 100644 --- a/database/seeders/NewPermissions.php +++ b/database/seeders/NewPermissions.php @@ -1,4 +1,23 @@ . + */ + namespace Database\Seeders; use Illuminate\Database\Seeder; diff --git a/database/seeders/PermissionSeeder.php b/database/seeders/PermissionSeeder.php index b6aef5d..88f4cf8 100644 --- a/database/seeders/PermissionSeeder.php +++ b/database/seeders/PermissionSeeder.php @@ -1,4 +1,23 @@ . + */ + namespace Database\Seeders; use Illuminate\Database\Seeder; @@ -41,35 +60,40 @@ class PermissionSeeder extends Seeder // Spatie wildcard permissions (same concept of MC permissions) - Permission::create(['name' => 'applications.submit']); - Permission::create(['name' => 'applications.stages.deny']); - Permission::create(['name' => 'applications.stages.approve']); - Permission::create(['name' => 'applications.view.all']); - Permission::create(['name' => 'applications.view.own']); - Permission::create(['name' => 'applications.vote']); - Permission::create(['name' => 'appointments.schedule']); - Permission::create(['name' => 'appointments.schedule.edit']); - Permission::create(['name' => 'appointments.schedule.cancel']); - Permission::create(['name' => 'applications.*']); - Permission::create(['name' => 'appointments.*']); + $permissions = [ + 'applications.submit', + 'applications.stages.deny', + 'applications.stages.approve', + 'applications.view.all', + 'applications.view.own', + 'applications.vote', + 'appointments.schedule', + 'appointments.schedule.edit', + 'appointments.schedule.cancel', + 'applications.*', + 'appointments.*', - Permission::create(['name' => 'profiles.view.others']); - Permission::create(['name' => 'profiles.edit.others']); + 'profiles.view.others', + 'profiles.edit.others', - Permission::create(['name' => 'admin.userlist']); - Permission::create(['name' => 'admin.stafflist']); - Permission::create(['name' => 'admin.hiring.forms']); - Permission::create(['name' => 'admin.hiring.formbuilder']); - Permission::create(['name' => 'admin.hiring.vacancy']); - Permission::create(['name' => 'admin.hiring.vacancy.edit,delete']); - Permission::create(['name' => 'admin.notificationsettings']); - Permission::create(['name' => 'admin.notificationsettings.edit']); - Permission::create(['name' => 'admin.hiring.*']); - Permission::create(['name' => 'admin.notificationsettings.*']); - Permission::create(['name' => 'admin.maintenance.logs.view']); + 'admin.userlist', + 'admin.stafflist', + 'admin.hiring.forms', + 'admin.hiring.formbuilder', + 'admin.hiring.vacancy', + 'admin.hiring.vacancy.edit,delete', + 'admin.notificationsettings', + 'admin.notificationsettings.edit', + 'admin.hiring.*', + 'admin.notificationsettings.*', + 'admin.maintenance.logs.view', + 'admin.developertools.use', + ]; - - Permission::create(['name' => 'admin.developertools.use']); + foreach ($permissions as $permission) + { + Permission::create(['name' => $permission]); + } $user->givePermissionTo([ 'applications.submit', diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 307bd95..d76b7ff 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -1,4 +1,23 @@ . + */ + namespace Database\Seeders; use App\Profile; @@ -15,6 +34,17 @@ class UserSeeder extends Seeder */ public function run() { + + $ghostAccount = User::create([ + 'uuid' => 'b741345057274a519144881927be0290', // Ghost + 'name' => 'Ghost (deleted account)', + 'email' => 'blackhole@example.com', + 'email_verified_at' => now(), + 'username' => 'ghost', + 'originalIP' => '0.0.0.0', + 'password' => 'locked' + ])->assignRole('user'); // There can't be role-less users + $staffUsers = [ [ diff --git a/resources/views/breadcrumbs/header.blade.php b/resources/views/breadcrumbs/header.blade.php index 3bdf164..12ad542 100755 --- a/resources/views/breadcrumbs/header.blade.php +++ b/resources/views/breadcrumbs/header.blade.php @@ -6,7 +6,7 @@ - +