mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
6756dd193e
Cleaning up routes to match laravel-scim-server's recommended implementation Some actually *working* changes for SCIM support?! Whoops, forgot my route file Fix public SCIM routes Removed Ziggy, removed old generated file, yanked Ziggy references Resolves the first set of comments for SCIM Ensure all /api routes have baseUrl prepended Fix the parent:: call to be, uh, actually correct :P Clarify the route-ordering, as it is quite tricky This gets it so that users can actually be saved.. Work around the lack of callbacks with some inheritance Mapped a bunch more fields from SCIM into Snipe-IT's user table More baseUrl shenanigans since we yanked Ziggy :/ Properly map job title and work with some other necessary attributes Map more fields... Finalized basic mapping for core and enterprise namespaces Latest tuned settings for SCIM config to work with Azure (and others)
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
|
|
use ArieTimmerman\Laravel\SCIMServer\RouteProvider as SCIMRouteProvider;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| SCIM Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| These are the routes that we have to explicitly inject from the
|
|
| laravel-scim-server project, which gives Snipe-IT SCIM support
|
|
|
|
|
*/
|
|
|
|
SCIMRouteProvider::publicRoutes(); // Make sure to load public routes *FIRST*
|
|
|
|
Route::middleware(['auth:api','authorize:superadmin'])->group(function () {
|
|
SCIMRouteProvider::routes(
|
|
[
|
|
/*
|
|
* If we leave public_routes as 'true', the public routes will load *now* and
|
|
* be jammed into the same middleware that these private routes are loaded
|
|
* with. That's bad, because these routes are *supposed* to be public.
|
|
*
|
|
* We loaded them a few lines above, *first*, otherwise the various
|
|
* fallback routes in the library defined within these *secured* routes
|
|
* will "take over" the above routes - and then you will end up losing
|
|
* like 4 hours of your life trying to figure out why the public routes
|
|
* aren't quite working right. Ask me how I know (BMW, 3/19/2022)
|
|
*/
|
|
'public_routes' => false
|
|
]
|
|
);
|
|
|
|
SCIMRouteProvider::meRoutes();
|
|
}); // ->can('superuser');
|