WIP: Next major version - AthenaHR v2 #1
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@@ -0,0 +1,8 @@
|
||||
# app is configured through docker-compose
|
||||
.env
|
||||
# deps are installed during build time
|
||||
node_modules
|
||||
vendor
|
||||
# Let the framework create its own cache. we don't need your cache if you rebuild the image
|
||||
/storage/*.*
|
||||
!/storage/**/
|
0
.editorconfig
Executable file → Normal file
0
.editorconfig
Executable file → Normal file
8
.env.example
Executable file → Normal file
8
.env.example
Executable file → Normal file
@@ -1,8 +1,8 @@
|
||||
APP_NAME=Laravel
|
||||
APP_NAME=AthenaHR
|
||||
APP_DESCRIPTION="AthenaHR - Your one-stop-shop for your community recruitment needs"
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_DEBUG=false
|
||||
APP_URL=http://localhost
|
||||
|
||||
# Please note: Use relative URLs. Absolute URLs will not work.
|
||||
@@ -58,8 +58,10 @@ NONPROD_FORCE_SECURE=false
|
||||
LOG_CHANNEL=daily
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=localhost
|
||||
DB_PORT=3306
|
||||
|
||||
# Using docker? You don't need to set these, they're managed in docker-compose.yml.
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
0
.gitattributes
vendored
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file → Normal file
1
.gitignore
vendored
Executable file → Normal file
1
.gitignore
vendored
Executable file → Normal file
@@ -19,3 +19,4 @@ yarn-error.log
|
||||
_ide_helper.php
|
||||
_ide_helper_models.php
|
||||
.phpstorm.meta.php
|
||||
/auth.json
|
||||
|
0
.styleci.yml
Executable file → Normal file
0
.styleci.yml
Executable file → Normal file
0
CODEOWNERS
Executable file → Normal file
0
CODEOWNERS
Executable file → Normal file
0
CODE_OF_CONDUCT.md
Executable file → Normal file
0
CODE_OF_CONDUCT.md
Executable file → Normal file
0
CONTRIBUTING.md
Executable file → Normal file
0
CONTRIBUTING.md
Executable file → Normal file
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM php:8.1-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype6-dev \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
libcurl4-openssl-dev \
|
||||
libonig-dev \
|
||||
imagemagick \
|
||||
libmagickwand-dev \
|
||||
&& pecl install imagick \
|
||||
&& docker-php-ext-enable imagick
|
||||
|
||||
RUN docker-php-ext-install gd pdo pdo_mysql zip curl mbstring xml
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY --chown=www-data:www-data . .
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
RUN composer update && composer install
|
||||
RUN npm ci
|
||||
|
||||
|
||||
RUN chmod -R 755 /var/www/html/storage
|
||||
RUN php artisan storage:link
|
||||
|
||||
|
||||
EXPOSE 9000
|
||||
CMD ["php-fpm"]
|
10
README.md
Executable file → Normal file
10
README.md
Executable file → Normal file
@@ -1,5 +1,14 @@
|
||||
# RBRecruiter v1.0.2-stable - Integrated Human Resources Management System
|
||||
|
||||
## Future Maintenance
|
||||
|
||||
This software is still maintained as of 2025. However, updates will be slow; the next release will be a maintenance release. There's no ETA for this.
|
||||
|
||||
### Current Git hosting
|
||||
|
||||
AthenaHR is currently hosted at [Webvoke Studio Gitea](code.webvokestudio.pt). This project had many homes; GitHub originally, GitLab, BitBucket, and then finally this Gitea instance. Instances of this repo elsewhere are mirrors.
|
||||
|
||||
|
||||
**Are the big name HR apps too bloated and overkill for your online community? Check RBRecruiter out to see if its right for you!**
|
||||
|
||||
Have you ever gotten tired of managing your community's staff member applications through Discord (or anything else) and having to scroll through hundreds of new messages just to find that one applicant's username? Struggling with missing/hard-to-find information? Then RBRecruiter is for you. Streamline your team member vetting/addition process by integrating RBRecruiter with your community, now with custom-made integrations to connect with several social platforms.
|
||||
@@ -18,6 +27,7 @@ Have you ever gotten tired of managing your community's staff member application
|
||||
- Controllable permissions - Every user has permissions! Control who has access to what (You can skip the application process and add staff members directly here).
|
||||
- Account suspension system - Having trouble with pesky spammers? Suspend them! This will keep them from signing up or signing in until you lift their suspension.
|
||||
- Notifications: Notifies slack and email primarily (Slack notifications currently broken)
|
||||
- Complete API - Integrate your app/service with AthenaHR and automate processes (WIP)
|
||||
|
||||
And many more features!
|
||||
|
||||
|
173
SECURITY.md
Executable file → Normal file
173
SECURITY.md
Executable file → Normal file
@@ -4,20 +4,25 @@
|
||||
|
||||
The following versions are currently supported:
|
||||
|
||||
| Version | Supported |
|
||||
|---------|--------------------|
|
||||
| 0.1.x | :x: |
|
||||
| 0.5.x | :x: |
|
||||
| 0.6.x | :x: |
|
||||
| 0.7.0 | :x: |
|
||||
| 0.7.1 | :x: |
|
||||
| 0.8.0 | :x: |
|
||||
| 0.8.1 | :x: |
|
||||
| 0.8.2 | :white_check_mark: |
|
||||
| 0.9.0 | :white_check_mark: |
|
||||
| Version | Supported |
|
||||
|--------------|--------------------|
|
||||
| 0.1.x | :x: |
|
||||
| 0.5.x | :x: |
|
||||
| 0.6.x | :x: |
|
||||
| 0.7.0 | :x: |
|
||||
| 0.7.1 | :x: |
|
||||
| 0.8.0 | :x: |
|
||||
| 0.8.1 | :x: |
|
||||
| 0.8.2 | :x: |
|
||||
| 0.9.0 | :x: |
|
||||
| 1.0.0 onward | :white_check_mark: |
|
||||
|
||||
Please note that all current versions are pre-release versions. This means that, until version `1.0.0` is reached, anything may change or break at any time, and releases are made often.
|
||||
However, all commits releases are thoroughly tested before they are pushed out, ensuring that the `main` branch is never broken.
|
||||
|
||||
All versions below 1.0.0 are considered pre-release versions and therefore are not supported; this means they won't receive any security updates, nor will they receive regular maintenance updates.
|
||||
|
||||
Versions above v.1.0.0 are currently supported and will receive security and maintenance updates for at least 6 months from their release date. This table will be updated when releases are no longer supported. Additionally, some versions will be marked as LTS, which means they will continue receiving support for at least two years.
|
||||
|
||||
Long story short, if you're using something below 1.0.0, you're own your own!
|
||||
|
||||
## Supported PHP Versions
|
||||
|
||||
@@ -25,15 +30,17 @@ However, all commits releases are thoroughly tested before they are pushed out,
|
||||
|---------|--------------------|
|
||||
| 5.x | :x: |
|
||||
| 7.x | :x: |
|
||||
| 8.0 | :white_check_mark: |
|
||||
| 8.0 | :x: |
|
||||
| 8.1 | :white_check_mark: |
|
||||
|
||||
At the moment, only PHP versions 8.1 and above are officially supported.
|
||||
|
||||
## Supported Operating Systems
|
||||
|
||||
| Name | Supported |
|
||||
| ------- | ------------------ |
|
||||
| Windows NT | :x: |
|
||||
| MacOS | Docker only |
|
||||
| ------- |--------------------|
|
||||
| Windows NT | Docker Only |
|
||||
| MacOS | Docker Only |
|
||||
| Ubuntu 22.10 | :white_check_mark: |
|
||||
| Other Linux distros | :white_check_mark: |
|
||||
|
||||
@@ -48,17 +55,129 @@ Use this public PGP key to encrypt your message:
|
||||
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mDMEYigDUBYJKwYBBAHaRw8BAQdAPSmEMgZc23ouaPwdW7IF5Ej5H7VUGR6Um8N4
|
||||
SAW92i60I01pZ3VlbCBOb2d1ZWlyYSA8bWVAbm9ndWVpcmEuY29kZXM+iJYEExYI
|
||||
AD4WIQTmfmRZELec2wocoaqNKugPeLO16wUCYigDUAIbAwUJAMo64AULCQgHAgYV
|
||||
CgkICwIEFgIDAQIeAQIXgAAKCRCNKugPeLO169kWAQCwd4E0WBB98/1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kSN9owNl
|
||||
cPqY7wsYVU7eS7WEIl5jnQOkGYQIEDtqoJUrUf0/n0frKs7o084TuP8ednzbpDIC
|
||||
K4WgPkxodgUOYJDiXio94TRgBN8H0uW6ew3allO9R5iB/5WKfUbx6BfqLKNtSdar
|
||||
NyOygnYabChA7CP4t77KPsOWDL+OcmHOK//QeID/hbqxOfBnkARq1zuLex6bS6kO
|
||||
/k925kCtzpT9dRpwmvccf9Hag36LItLzInt526MG
|
||||
=eyRs
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
|
||||
You may use [this tool](https://pgptool.org/) to encrypt and sign your message.
|
||||
|
||||
|
||||
## Using the Issue Tracker
|
||||
|
||||
This GitLab system is intended for internal use only, therefore, only authorized users may sign up and sign in via the currently configured idP integration. However, if you want to contribute to the project or submit a bug report, please feel free to request an account!
|
||||
|
||||
Account requests are granted regularly, though requests will be expedited/prioritised for users with their own email domain and users with an established GitLab/GitHub account.
|
||||
|
||||
To request an account, please follow the format below and send it to ``security@webvokestudio.pt``:
|
||||
|
||||
Subject: Future Gamers GitLab Account Request - [Your Name]
|
||||
Body:
|
||||
|
||||
Reason: I want an account because A and B
|
||||
GitLab/GitHub: https://gitlab.com/YourAccount OR https://github.com/YourAccount
|
||||
|
0
app/Absence.php
Executable file → Normal file
0
app/Absence.php
Executable file → Normal file
0
app/Application.php
Executable file → Normal file
0
app/Application.php
Executable file → Normal file
0
app/Appointment.php
Executable file → Normal file
0
app/Appointment.php
Executable file → Normal file
0
app/Ban.php
Executable file → Normal file
0
app/Ban.php
Executable file → Normal file
0
app/Comment.php
Executable file → Normal file
0
app/Comment.php
Executable file → Normal file
0
app/Console/Commands/CountVotes.php
Executable file → Normal file
0
app/Console/Commands/CountVotes.php
Executable file → Normal file
0
app/Console/Commands/CreateUser.php
Executable file → Normal file
0
app/Console/Commands/CreateUser.php
Executable file → Normal file
0
app/Console/Commands/Install.php
Executable file → Normal file
0
app/Console/Commands/Install.php
Executable file → Normal file
0
app/Console/Commands/MakeFile.php
Executable file → Normal file
0
app/Console/Commands/MakeFile.php
Executable file → Normal file
0
app/Console/Commands/SetEnv.php
Executable file → Normal file
0
app/Console/Commands/SetEnv.php
Executable file → Normal file
@@ -1,74 +0,0 @@
|
||||
<?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 App\Console;
|
||||
|
||||
use App\Jobs\ProcessDueSuspensions;
|
||||
use App\Jobs\ProcessExpiredAbsences;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* The Artisan commands provided by your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
$schedule->command('vote:evaluate')
|
||||
->daily();
|
||||
// Production value: Every day
|
||||
|
||||
$schedule->job(new ProcessDueSuspensions)
|
||||
->daily();
|
||||
// Production value: Every day
|
||||
// Development value: Every minute
|
||||
|
||||
$schedule->job(new ProcessExpiredAbsences)
|
||||
->daily();
|
||||
// Production value: Every day
|
||||
// Development value: Every minute
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
0
app/CustomFacades/IP.php
Executable file → Normal file
0
app/CustomFacades/IP.php
Executable file → Normal file
0
app/Enums/Overrides.php
Executable file → Normal file
0
app/Enums/Overrides.php
Executable file → Normal file
0
app/Events/ApplicationApprovedEvent.php
Executable file → Normal file
0
app/Events/ApplicationApprovedEvent.php
Executable file → Normal file
0
app/Events/ApplicationDeniedEvent.php
Executable file → Normal file
0
app/Events/ApplicationDeniedEvent.php
Executable file → Normal file
0
app/Events/NewApplicationEvent.php
Executable file → Normal file
0
app/Events/NewApplicationEvent.php
Executable file → Normal file
0
app/Events/UserBannedEvent.php
Executable file → Normal file
0
app/Events/UserBannedEvent.php
Executable file → Normal file
0
app/Exceptions/AbsenceNotActionableException.php
Executable file → Normal file
0
app/Exceptions/AbsenceNotActionableException.php
Executable file → Normal file
0
app/Exceptions/AccountNotLinkedException.php
Executable file → Normal file
0
app/Exceptions/AccountNotLinkedException.php
Executable file → Normal file
0
app/Exceptions/ApplicationNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ApplicationNotFoundException.php
Executable file → Normal file
0
app/Exceptions/DiscordAccountRequiredException.php
Executable file → Normal file
0
app/Exceptions/DiscordAccountRequiredException.php
Executable file → Normal file
0
app/Exceptions/EmptyFormException.php
Executable file → Normal file
0
app/Exceptions/EmptyFormException.php
Executable file → Normal file
0
app/Exceptions/EmptyOptionsException.php
Executable file → Normal file
0
app/Exceptions/EmptyOptionsException.php
Executable file → Normal file
0
app/Exceptions/FailedCaptchaException.php
Executable file → Normal file
0
app/Exceptions/FailedCaptchaException.php
Executable file → Normal file
0
app/Exceptions/FileUploadException.php
Executable file → Normal file
0
app/Exceptions/FileUploadException.php
Executable file → Normal file
0
app/Exceptions/FormHasConstraintsException.php
Executable file → Normal file
0
app/Exceptions/FormHasConstraintsException.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/IncompatibleAgeException.php
Executable file → Normal file
0
app/Exceptions/IncompatibleAgeException.php
Executable file → Normal file
0
app/Exceptions/IncompleteApplicationException.php
Executable file → Normal file
0
app/Exceptions/IncompleteApplicationException.php
Executable file → Normal file
0
app/Exceptions/InvalidAgeException.php
Executable file → Normal file
0
app/Exceptions/InvalidAgeException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentStatusException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentStatusException.php
Executable file → Normal file
0
app/Exceptions/InvalidGamePreferenceException.php
Executable file → Normal file
0
app/Exceptions/InvalidGamePreferenceException.php
Executable file → Normal file
0
app/Exceptions/InvalidInviteException.php
Executable file → Normal file
0
app/Exceptions/InvalidInviteException.php
Executable file → Normal file
0
app/Exceptions/OptionCategoryNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionCategoryNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ProfileAlreadyExistsException.php
Executable file → Normal file
0
app/Exceptions/ProfileAlreadyExistsException.php
Executable file → Normal file
0
app/Exceptions/ProfileCreationFailedException.php
Executable file → Normal file
0
app/Exceptions/ProfileCreationFailedException.php
Executable file → Normal file
0
app/Exceptions/ProfileNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ProfileNotFoundException.php
Executable file → Normal file
0
app/Exceptions/PublicTeamInviteException.php
Executable file → Normal file
0
app/Exceptions/PublicTeamInviteException.php
Executable file → Normal file
0
app/Exceptions/UnavailableApplicationException.php
Executable file → Normal file
0
app/Exceptions/UnavailableApplicationException.php
Executable file → Normal file
0
app/Exceptions/UserAlreadyInvitedException.php
Executable file → Normal file
0
app/Exceptions/UserAlreadyInvitedException.php
Executable file → Normal file
0
app/Exceptions/VacancyNotFoundException.php
Executable file → Normal file
0
app/Exceptions/VacancyNotFoundException.php
Executable file → Normal file
0
app/Facades/ContextAwareValidation.php
Executable file → Normal file
0
app/Facades/ContextAwareValidation.php
Executable file → Normal file
0
app/Facades/DigitalStorageHelper.php
Executable file → Normal file
0
app/Facades/DigitalStorageHelper.php
Executable file → Normal file
0
app/Facades/Discord.php
Executable file → Normal file
0
app/Facades/Discord.php
Executable file → Normal file
0
app/Facades/IP.php
Executable file → Normal file
0
app/Facades/IP.php
Executable file → Normal file
0
app/Facades/JSON.php
Executable file → Normal file
0
app/Facades/JSON.php
Executable file → Normal file
0
app/Facades/Options.php
Executable file → Normal file
0
app/Facades/Options.php
Executable file → Normal file
0
app/Facades/UUID.php
Executable file → Normal file
0
app/Facades/UUID.php
Executable file → Normal file
0
app/Form.php
Executable file → Normal file
0
app/Form.php
Executable file → Normal file
0
app/Helpers/ContextAwareValidator.php
Executable file → Normal file
0
app/Helpers/ContextAwareValidator.php
Executable file → Normal file
0
app/Helpers/DigitalStorageHelper.php
Executable file → Normal file
0
app/Helpers/DigitalStorageHelper.php
Executable file → Normal file
0
app/Helpers/Discord.php
Executable file → Normal file
0
app/Helpers/Discord.php
Executable file → Normal file
0
app/Helpers/JSON.php
Executable file → Normal file
0
app/Helpers/JSON.php
Executable file → Normal file
0
app/Helpers/Options.php
Executable file → Normal file
0
app/Helpers/Options.php
Executable file → Normal file
0
app/Http/Controllers/AbsenceController.php
Executable file → Normal file
0
app/Http/Controllers/AbsenceController.php
Executable file → Normal file
0
app/Http/Controllers/ApplicationController.php
Executable file → Normal file
0
app/Http/Controllers/ApplicationController.php
Executable file → Normal file
0
app/Http/Controllers/AppointmentController.php
Executable file → Normal file
0
app/Http/Controllers/AppointmentController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ConfirmPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ConfirmPasswordController.php
Executable file → Normal file
19
app/Http/Controllers/Auth/DiscordController.php
Executable file → Normal file
19
app/Http/Controllers/Auth/DiscordController.php
Executable file → Normal file
@@ -21,8 +21,11 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Facades\Options;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
@@ -37,8 +40,13 @@ class DiscordController extends Controller
|
||||
->redirect();
|
||||
}
|
||||
|
||||
public function discordCallback()
|
||||
public function discordCallback(Request $request)
|
||||
{
|
||||
if($request->has('error'))
|
||||
{
|
||||
abort(401, __("Access Denied: To sign in with your Discord account or apply for positions requiring it, please ensure you authorize our application (:applicationName). We request permissions to manage your account, maintain it, and handle your permissions within our community servers. Feel free to read our Privacy Policy if you have any concerns.", ['applicationName' => config('app.name')]));
|
||||
}
|
||||
|
||||
try {
|
||||
$discordUser = Socialite::driver('discord')->user();
|
||||
} catch (InvalidStateException $stateException) {
|
||||
@@ -49,6 +57,7 @@ class DiscordController extends Controller
|
||||
]);
|
||||
|
||||
return redirect(route('discordRedirect'));
|
||||
|
||||
}
|
||||
|
||||
$appUser = User::where('email', $discordUser->getEmail())->first();
|
||||
@@ -62,6 +71,14 @@ class DiscordController extends Controller
|
||||
|
||||
Auth::login($appUser, true);
|
||||
} else {
|
||||
|
||||
if (!Options::getOption('enable_registrations'))
|
||||
{
|
||||
return redirect()
|
||||
->route('home')
|
||||
->with('error', __('Hey there, ' . $discordUser->getName() . '! Sign ups are currently closed so we were not able to create your account. Head over to the sign up page to request an invitation if you\'d like. Alternatively, if you already have an account here, make sure to log in with Discord with the correct account you linked beforehand.'));
|
||||
}
|
||||
|
||||
$oAuthUser = User::create([
|
||||
'uuid' => null,
|
||||
'name' => $discordUser->getName(),
|
||||
|
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/LoginController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/LoginController.php
Executable file → Normal file
22
app/Http/Controllers/Auth/RegisterController.php
Executable file → Normal file
22
app/Http/Controllers/Auth/RegisterController.php
Executable file → Normal file
@@ -28,6 +28,7 @@ use App\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Session;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
@@ -71,6 +72,10 @@ class RegisterController extends Controller
|
||||
{
|
||||
$password = ['required', 'string', 'confirmed'];
|
||||
|
||||
$signupEnabled = Options::getOption('enable_registrations');
|
||||
$signupOverride = Session::has('ALLOW_REGISTRATION_OVERRIDE') && Session::get('ALLOW_REGISTRATION_OVERRIDE') === true;
|
||||
$signupOverrideEmail = Session::has('REGISTRATION_OVERRIDE_EMAIL') ? Session::get('REGISTRATION_OVERRIDE_EMAIL') : null;
|
||||
|
||||
switch (Options::getOption('pw_security_policy')) { // this could be better structured, switch doesn't feel right
|
||||
case 'off':
|
||||
$password = ['required', 'string', 'confirmed'];
|
||||
@@ -99,7 +104,15 @@ class RegisterController extends Controller
|
||||
'dob.required' => __('Please enter your date of birth.'),
|
||||
'uuid.required' => __('Please enter a valid (and Premium) Minecraft username! We do not support cracked users.'),
|
||||
'acceptTerms.required' => __('Please accept the Community Guidelines, Terms of Service and Privacy Policy to continue.'),
|
||||
]);
|
||||
|
||||
])->after(function (\Illuminate\Validation\Validator $validator) use ($signupEnabled, $signupOverride, $signupOverrideEmail) {
|
||||
|
||||
$email = $validator->getData()['email'];
|
||||
|
||||
$validator->errors()->addIf(!$signupEnabled && !$signupOverride, 'signup', __('We\'re sorry, but new sign ups are currently closed and invite-only.'));
|
||||
$validator->errors()->addIf($signupOverride && $email !== $signupOverrideEmail, 'email', 'You must sign up with the email address you were invited with.');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,6 +137,13 @@ class RegisterController extends Controller
|
||||
|
||||
$user->assignRole('user');
|
||||
|
||||
if (Session::get('ALLOW_REGISTRATION_OVERRIDE')) {
|
||||
Session::forget([
|
||||
'ALLOW_REGISTRATION_OVERRIDE',
|
||||
'REGISTRATION_OVERRIDE_EMAIL'
|
||||
]);
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
0
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/TwofaController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/TwofaController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/VerificationController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/VerificationController.php
Executable file → Normal file
0
app/Http/Controllers/CommentController.php
Executable file → Normal file
0
app/Http/Controllers/CommentController.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Controllers/DashboardController.php
Executable file → Normal file
0
app/Http/Controllers/DashboardController.php
Executable file → Normal file
0
app/Http/Controllers/DevToolsController.php
Executable file → Normal file
0
app/Http/Controllers/DevToolsController.php
Executable file → Normal file
0
app/Http/Controllers/FormController.php
Executable file → Normal file
0
app/Http/Controllers/FormController.php
Executable file → Normal file
0
app/Http/Controllers/HomeController.php
Executable file → Normal file
0
app/Http/Controllers/HomeController.php
Executable file → Normal file
158
app/Http/Controllers/InvitationController.php
Normal file
158
app/Http/Controllers/InvitationController.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\ApproveInviteRequest;
|
||||
use App\Http\Requests\DenyInviteRequest;
|
||||
use App\Http\Requests\InvitationRequest;
|
||||
use App\Http\Requests\ValidateInviteRequest;
|
||||
use App\Invitation;
|
||||
use App\Mail\InviteApprovedMail;
|
||||
use App\Mail\InvitedToApp;
|
||||
use App\Mail\InviteRequestReceived;
|
||||
use App\Response;
|
||||
use Auth;
|
||||
use Illuminate\Http\Request;
|
||||
use Mail;
|
||||
use Session;
|
||||
|
||||
class InvitationController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$this->authorize('viewAny', Invitation::class);
|
||||
|
||||
return view('dashboard.administration.invites', [
|
||||
'invites' => Invitation::all()
|
||||
]);
|
||||
}
|
||||
|
||||
public function requestInvite(InvitationRequest $request)
|
||||
{
|
||||
|
||||
$this->authorize('create', Invitation::class);
|
||||
|
||||
$guest = Auth::guest();
|
||||
$invitation = new Invitation();
|
||||
|
||||
$invitation->requestor_email = $request->input('email');
|
||||
$invitation->requestor_ip_address = $request->ip();
|
||||
$invitation->status = $guest ? 'pending' : 'approved';
|
||||
$invitation->invitation_code = bin2hex(random_bytes(64));
|
||||
$invitation->expiration = now()->addDays(2);
|
||||
|
||||
try {
|
||||
$invitation->saveOrFail();
|
||||
$addlMessage = ($guest) ? __('Check your email address for a confirmation email.') : '';
|
||||
|
||||
$request->session()->flash('success', __('Invitation request sent. :additionalUnauthenticatedMessage', ['additionalUnauthenticatedMessage' => $addlMessage]));
|
||||
|
||||
if ($guest) {
|
||||
Mail::to($invitation->requestor_email)->send(new InviteRequestReceived());
|
||||
}
|
||||
else {
|
||||
// this is an approved invite
|
||||
Mail::to($invitation->requestor_email)->send(new InvitedToApp($invitation));
|
||||
}
|
||||
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
|
||||
\Log::debug('[INVITES]: Error saving invite request', ['message' => $exception->getMessage(), 'requestor_ip' => $request->ip()]);
|
||||
$request->session()->flash('error', __('Sorry, but we were unable to request an invitation for you. If you already requested one, trying to request another will not be possible, nor will it speed up the process.'));
|
||||
|
||||
}
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
public function approveInvite(ApproveInviteRequest $request, Invitation $invitation)
|
||||
{
|
||||
$this->authorize('update', $invitation);
|
||||
|
||||
$approvableStates = [
|
||||
'pending'
|
||||
];
|
||||
|
||||
if ($invitation->expiration && now()->lessThanOrEqualTo($invitation->expiration) && in_array($invitation->status, $approvableStates))
|
||||
{
|
||||
$invitation->status = 'approved';
|
||||
$invitation->save();
|
||||
|
||||
Mail::to($invitation->requestor_email)->send(new InviteApprovedMail($invitation));
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', __('Invite request approved! This user can now sign up.'));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', __('This invitation couldn\'t be approved because either it\'s already approved or it is expired.'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function denyInvite(DenyInviteRequest $request, Invitation $invitation)
|
||||
{
|
||||
$this->authorize('update', $invitation);
|
||||
|
||||
$declinableStates = [
|
||||
'pending'
|
||||
];
|
||||
|
||||
if ($invitation->expiration && now()->lessThanOrEqualTo($invitation->expiration) && in_array($invitation->status, $declinableStates))
|
||||
{
|
||||
$invitation->status = 'denied';
|
||||
$invitation->save();
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', __('Invitation denied. No notifications were sent. This user cannot be invited again.'));
|
||||
|
||||
}
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', __('This invitation could not be denied because it is either already approved, expired, or in an otherwise invalid state.'));
|
||||
}
|
||||
|
||||
public function redeemInvite(Request $request)
|
||||
{
|
||||
return view('auth.redeem-invite', ['validationToken' => $request->route('token')]);
|
||||
}
|
||||
|
||||
public function validateInvite(ValidateInviteRequest $request)
|
||||
{
|
||||
$token = $request->input('validation_token');
|
||||
$email = $request->input('email');
|
||||
|
||||
$invite = Invitation::where('requestor_email', $email)->first();
|
||||
|
||||
|
||||
|
||||
if (!empty($invite) && $token === $invite->invitation_code && 'approved' === $invite->status && $invite->expiration && now()->lessThanOrEqualTo($invite->expiration))
|
||||
{
|
||||
$invite->status = 'completed';
|
||||
$invite->save();
|
||||
|
||||
Session::put('ALLOW_REGISTRATION_OVERRIDE', true);
|
||||
Session::put('REGISTRATION_OVERRIDE_EMAIL', $email);
|
||||
|
||||
return redirect()
|
||||
->route('register')
|
||||
->with('success', __('Invitation code validated! You can now sign up with the email address you were invited with.'));
|
||||
}
|
||||
else
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', __('Something went wrong while validating your invite. Either it does not exist, is expired, has not been approved yet, or the token is wrong (do not edit it).'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
3
app/Http/Controllers/OptionsController.php
Executable file → Normal file
3
app/Http/Controllers/OptionsController.php
Executable file → Normal file
@@ -55,6 +55,9 @@ class OptionsController extends Controller
|
||||
'requiresPMC' => Options::getOption('requireGameLicense'),
|
||||
'enforce2fa' => Options::getOption('force2fa'),
|
||||
],
|
||||
'features' => [
|
||||
'enableRegistrations' => Options::getOption('enable_registrations')
|
||||
],
|
||||
'currentGame' => Options::getOption('currentGame'),
|
||||
]);
|
||||
}
|
||||
|
0
app/Http/Controllers/ProfileController.php
Executable file → Normal file
0
app/Http/Controllers/ProfileController.php
Executable file → Normal file
1
app/Http/Controllers/SecuritySettingsController.php
Executable file → Normal file
1
app/Http/Controllers/SecuritySettingsController.php
Executable file → Normal file
@@ -21,6 +21,7 @@ class SecuritySettingsController extends Controller
|
||||
'pwExpiry' => $request->pwExpiry,
|
||||
'enforce2fa' => $request->enforce2fa,
|
||||
'requirePMC' => $request->requirePMC,
|
||||
'enable_registrations' => $request->input('enable_registrations')
|
||||
]);
|
||||
|
||||
return redirect()
|
||||
|
0
app/Http/Controllers/TeamController.php
Executable file → Normal file
0
app/Http/Controllers/TeamController.php
Executable file → Normal file
0
app/Http/Controllers/TeamFileController.php
Executable file → Normal file
0
app/Http/Controllers/TeamFileController.php
Executable file → Normal file
0
app/Http/Controllers/UserController.php
Executable file → Normal file
0
app/Http/Controllers/UserController.php
Executable file → Normal file
0
app/Http/Controllers/VacancyController.php
Executable file → Normal file
0
app/Http/Controllers/VacancyController.php
Executable file → Normal file
0
app/Http/Controllers/VoteController.php
Executable file → Normal file
0
app/Http/Controllers/VoteController.php
Executable file → Normal file
@@ -1,96 +0,0 @@
|
||||
<?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 App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:60,1',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*
|
||||
* These middleware may be assigned to groups or used individually.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'eligibility' => \App\Http\Middleware\ApplicationEligibility::class,
|
||||
'usernameUUID' => \App\Http\Middleware\UsernameUUID::class,
|
||||
'forcelogout' => \App\Http\Middleware\ForceLogoutMiddleware::class,
|
||||
'2fa' => \PragmaRX\Google2FALaravel\Middleware::class,
|
||||
'passwordexpiration' => \App\Http\Middleware\PasswordExpirationMiddleware::class,
|
||||
'passwordredirect' => \App\Http\Middleware\PasswordExpirationRedirectMiddleware::class,
|
||||
'localize' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class,
|
||||
'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class,
|
||||
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
|
||||
'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class,
|
||||
'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class,
|
||||
];
|
||||
}
|
0
app/Http/Middleware/ApplicationEligibility.php
Executable file → Normal file
0
app/Http/Middleware/ApplicationEligibility.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user