Organisation registration process implemented with configurable approval workflow
This commit is contained in:
31
routes/organisation-registration.php
Normal file
31
routes/organisation-registration.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* AVSDev UF Organisations (https://avsdev.uk)
|
||||
*
|
||||
* @link https://git.avsdev.uk/avsdev/sprinkle-organisations
|
||||
* @license https://git.avsdev.uk/avsdev/sprinkle-organisations/blob/master/LICENSE.md (LGPL-3.0 License)
|
||||
*/
|
||||
|
||||
use UserFrosting\Sprinkle\Core\Util\NoCache;
|
||||
|
||||
/*
|
||||
* Routes for organisation registration workflows.
|
||||
*/
|
||||
$app->group('/organisations', function () {
|
||||
$this->get('/registration/approve', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:approveToken');
|
||||
$this->get('/registration/reject', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:rejectToken');
|
||||
|
||||
$this->post('/o/{slug}/registration/approve', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:approve');
|
||||
$this->post('/o/{slug}/registration/reject', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:reject');
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
|
||||
$app->group('/api/organisations', function () {
|
||||
$this->post('/register', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:register');
|
||||
$this->delete('/o/{slug}/registration', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:cancel');
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
|
||||
$app->group('/modals/organisations', function () {
|
||||
$this->get('/register', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:getModalRegister');
|
||||
$this->get('/registration/confirm-cancel', 'UserFrosting\Sprinkle\Organisations\Controller\OrganisationRegistrationController:getModalConfirmCancel');
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
@@ -47,4 +47,3 @@ $app->group('/modals/organisations', function () {
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
|
||||
// TODO: add route for accepting members
|
||||
// TODO: add route for verifying organisations
|
||||
|
||||
Reference in New Issue
Block a user