fix: add error403.blade.php to resolve crash on permission-gated pages#3365
Draft
fix: add error403.blade.php to resolve crash on permission-gated pages#3365
Conversation
|
|
Agent-Logs-Url: https://github.com/Leantime/leantime/sessions/80ad5a94-1f0a-46cf-b90d-e4a3bb9f1789 Co-authored-by: marcelfolaron <47038998+marcelfolaron@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add 403 Access Denied error page template
fix: add error403.blade.php to resolve crash on permission-gated pages
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accessing any permission-gated page as a non-owner user crashed with
View [error403] not found. The root cause:Template::display('errors.error403')resolves toerrors::error403, finds the legacy.tpl.php, then loads theapplayout with$module='errors'/$action='error403'— but theAppview composer overrides$modulewith the current request's module (e.g.setting), causing@include("setting::error403")to fail.Changes
app/Domain/Errors/Templates/error403.blade.php— new Blade template forerrors::error403When a
.blade.phpfile is present,Template::display()takes the blade code path: passes$layoutdirectly to the view (not$module/$action), the template extends it, and the layout falls through to@yield('content')— entirely bypassing the App composer override.Covers all affected controllers: Users, Projects, Clients, Settings, API, Timesheets, Calendar, Sprints, Tickets.
Original prompt