Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubyforgood/human-essentials
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d8d51f06b482cb84c7a98d4f7ae1739610028f59
Choose a base ref
..
head repository: rubyforgood/human-essentials
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 97f252de8b269eb532703467892000f1ca3c66e4
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/controllers/application_controller.rb
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ def authorize_user
end

def authorize_org_user
verboten! unless current_user.has_role?(Role::SUPER_ADMIN) ||
verboten!('That screen is not available. Please switch to the correct role and try again.') unless current_user.has_role?(Role::SUPER_ADMIN) ||
current_user.has_role?(Role::ORG_USER, current_organization)
end

@@ -102,7 +102,7 @@ def not_found!
end
end

def verboten!(message: 'Access Denied.')
def verboten!(message = 'Access Denied.')
respond_to do |format|
format.html { redirect_to dashboard_path_from_current_role, flash: { error: message } }
format.json { render body: nil, status: :forbidden }