Provide ability for admins to manage user organisation membership & admin rights
- Required overwriting a bunch of base code to slot in the handling - Admins are shown with yellow text in their organisation label
This commit is contained in:
1 parent
609454def2
commit
9d62749914
14 files changed
+763
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?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;
|
||||
|
||||
/*
|
||||
* Extra routes for administrative user management.
|
||||
*/
|
||||
$app->group('/api/users', function () {
|
||||
$this->get('/u/{user_name}/organisations', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:getOrganisations');
|
||||
|
||||
$this->put('/u/{user_name}/{field}', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:updateField');
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
|
||||
$app->group('/modals/users', function () {
|
||||
$this->get('/organisations', 'UserFrosting\Sprinkle\Organisations\Controller\UserController:getModalEditOrganisations');
|
||||
})->add('authGuard')->add(new NoCache());
|
||||
Reference in new issue
Block a user