WIP: Road to 1.0.0 #1

Draft
miguel456 wants to merge 123 commits from develop into master
9 changed files with 221 additions and 50 deletions
Showing only changes of commit 1aee4c053f - Show all commits

View File

@ -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

View File

@ -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": {

76
composer.lock generated
View File

@ -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"
}

View File

@ -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);
}
}

View File

@ -1,4 +1,25 @@
<?php
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
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');
}
}

View File

@ -1,4 +1,23 @@
<?php
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
namespace Database\Seeders;
use Illuminate\Database\Seeder;

View File

@ -1,4 +1,23 @@
<?php
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
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',

View File

@ -1,4 +1,23 @@
<?php
/*
* Copyright © 2020 Miguel Nogueira
*
* This file is part of Raspberry Staff Manager.
*
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Raspberry Staff Manager is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
*/
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 = [
[

View File

@ -6,7 +6,7 @@
<meta charset="utf-8">
<meta name="description" content="{{ config('app.name') }} Staff Member Management Tool">
<meta name="author" content="Miguel Nogueira">
<meta name="author" content="Miguel N.">
<meta name="tags" content="minecraft, minecraft server staff, minecraft staff, minecraft servers">
<meta name="viewport" content="width=device-width, initial-scale=1.0">