crp87 - When using TwillRoutes::getRouteGroupOp...


05/25/2023, 6:20 AM
When using TwillRoutes::getRouteGroupOptions() for grouping and TwillRoutes::getRouteMiddleware(), shouldn’t a user be redirected to twill login page when the session expired? For a custom CMS page, which extends A17\Twill\Http\Controllers\Admin\Controller this doesn’t happen. Instead I receive the error that calling can() on null is not possible from within main.blade.php on Media library authorized check. Did I miss something?
Do I explicitly need to define a Gate rule with permission check for custom CMS pages/routes? If so, then the documentation is missing this part of information
Ok, found another way to register the routes with: TwillRoutes::registerRoutes() does the same thing with middleware and group but this way it seems to magically work with redirect or user is not authenticated anymore.