Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display error instead of fatal error when trying to view a case that you don't have permission to access #13505

Merged
merged 1 commit into from
Jan 27, 2019

Conversation

mattwire
Copy link
Contributor

Overview

The fatal error page is not user-friendly and suggests something has gone wrong with the system - it is also deprecated. In this case the fatal error page is shown if you click "Manage" on a case which you don't have permission to access - this PR changes that to statusBounce() so the user remains on the case dashboard and is shown an error popup instead.

Before

Fatal error page when trying to access case from dashboard with filter set to "All cases" and clicking "Manage" on a case that you do not have access to.

After

"Friendly error" when trying to access case from dashboard with filter set to "All cases" and clicking "Manage" on a case that you do not have access to.
portal gaddumcentre co uk_civicrm_case_reset 1

Technical Details

In general swapping CRM_Core_Error::fatal() for CRM_Core_Error::statusBounce() is ok for forms when something "normal" is happening. An SQL query failure for example you might expect to see the fatal error screen as that is not a "normal" situation.

Comments

…or page when trying to access case that you do not have permission for
@civibot
Copy link

civibot bot commented Jan 25, 2019

(Standard links)

@civibot civibot bot added the master label Jan 25, 2019
@eileenmcnaughton eileenmcnaughton merged commit a2aecef into civicrm:master Jan 27, 2019
@mattwire mattwire deleted the caseview_fatalerror branch March 1, 2019 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants