Rename GuestUser to ApplicationSession as middleware to hold any site wide variables

This commit is contained in:
2023-03-02 12:15:08 +11:00
parent e0fb057c84
commit 35596ec867
5 changed files with 36 additions and 35 deletions

View File

@@ -22,7 +22,7 @@ class APIController extends Controller
$dn = Crypt::decryptString($request->query('key'));
Log::debug(sprintf('%s: Query [%s] - Levels [%d]',__METHOD__,$dn,$levels));
return (new Server())
return (config('server'))
->children($dn)
->transform(function($item) {
return [

View File

@@ -54,7 +54,7 @@ class HomeController extends Controller
public function info()
{
// Load our attributes
$s = new Server;
$s = config('server');
$s->schema('objectclasses');
$s->schema('attributetypes');
@@ -73,7 +73,7 @@ class HomeController extends Controller
$dn = Crypt::decryptString($request->post('key'));
return view('frames.dn')
->with('o',(new Server)->fetch($dn))
->with('o',config('server')->fetch($dn))
->with('dn',$dn);
}
@@ -87,7 +87,7 @@ class HomeController extends Controller
*/
public function schema_frame(Request $request)
{
$s = new Server;
$s = config('server');
// If an invalid key, we'll 404
if ($request->type && $request->key && ($s->schema($request->type)->has($request->key) === FALSE))