Skip to content

Commit

Permalink
Merge pull request #2773 from DMPRoadmap/development
Browse files Browse the repository at this point in the history
Pulling in final bug fix for v3.0.1
  • Loading branch information
briri committed Dec 18, 2020
2 parents 4c3e879 + b86c2bc commit aa01147
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions app/controllers/orgs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def admin_update
# This action is used by installations that have the following config enabled:
# Rails.configuration.x.shibboleth.use_filtered_discovery_service
def shibboleth_ds
redirect_to root_path unless current_user.nil?
unless current_user.nil?
redirect_to root_path
return
end

@user = User.new
# Display the custom Shibboleth discovery service page.
Expand All @@ -106,12 +109,13 @@ def shibboleth_ds

# Disabling the rubocop check here because it would not be clear what happens
# if the ``@orgs` array has items ... it renders the shibboleth_ds view
# rubocop:disable Style/GuardClause
# rubocop:disable Style/GuardClause, Style/RedundantReturn
if @orgs.empty?
flash.now[:alert] = _("No organisations are currently registered.")
redirect_to user_shibboleth_omniauth_authorize_path
return
end
# rubocop:enable Style/GuardClause
# rubocop:enable Style/GuardClause, Style/RedundantReturn
end

# This action is used to redirect a user to the Shibboleth IdP
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/super_admin/themes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def destroy
redirect_to super_admin_themes_path, notice: msg
else
flash.now[:alert] = failure_message(@theme, _("delete"))
redner :edit
render :edit
end
end

Expand Down

0 comments on commit aa01147

Please sign in to comment.