Skip to content

Commit 27fdd4a

Browse files
authored
Merge pull request #679 from IU-Libraries-Joint-Development/2107_user-root-path
ESSI-2107 Sends user to dashboard or homepage depending on site usage
2 parents da12f38 + 9aee2fd commit 27fdd4a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/controllers/application_controller.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,10 @@ def set_locale
5050
def constrained_locale
5151
return params[:locale] if params[:locale].in? Object.new.extend(HyraxHelper).available_translations
5252
end
53+
54+
# Devise uses this method to tell where to send the user to after signing in.
55+
# Conditionally set to either the dashboard or root_path based on site_usage.
56+
def user_root_path
57+
helpers.access_only? ? root_path : hyrax.dashboard_path
58+
end
5359
end

0 commit comments

Comments
 (0)