diff --git a/CHANGELOG.md b/CHANGELOG.md index fd98f334..12e794ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Next +# [1.35.1] - 08/12/2022 + +* [PR 530] Redirect admin user to admin context + # [1.35.0] - 14/12/2020 * [PR 513] Allow skipping the app landing page when the url contains a special key diff --git a/Gemfile.lock b/Gemfile.lock index bc78402c..8e1a14ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -394,7 +394,9 @@ GEM mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) - mimemagic (0.3.2) + mimemagic (0.3.10) + nokogiri (~> 1) + rake mini_magick (4.8.0) mini_mime (1.0.0) mini_portile2 (2.3.0) @@ -553,9 +555,9 @@ GEM rspec-mocks (~> 3.7.0) rspec-support (~> 3.7.0) rspec-support (3.7.1) + ruby-rc4 (0.1.5) ruby_parser (3.14.2) sexp_processor (~> 4.9) - ruby-rc4 (0.1.5) sass (3.5.5) sass-listen (~> 4.0.0) sass-listen (4.0.0) diff --git a/app/controllers/admin/admin_users/sessions_controller.rb b/app/controllers/admin/admin_users/sessions_controller.rb index 1a761982..2f2ef415 100644 --- a/app/controllers/admin/admin_users/sessions_controller.rb +++ b/app/controllers/admin/admin_users/sessions_controller.rb @@ -1,3 +1,13 @@ class Admin::AdminUsers::SessionsController < Devise::SessionsController layout 'admin/application' + + def after_sign_in_path_for(resource_or_scope) + previous_path = super(resource_or_scope) + + unless previous_path.to_s.start_with? admin_path + return admin_path + end + + previous_path + end end diff --git a/docker/install-image-magick.sh b/docker/install-image-magick.sh index 33090d22..76433ecc 100755 --- a/docker/install-image-magick.sh +++ b/docker/install-image-magick.sh @@ -26,7 +26,7 @@ IMAGE_MAGICK_DIR="ImageMagick-$IMAGE_MAGICK_VERSION" IMAGE_MAGICK_URL="http://www.imagemagick.org/download/releases/$IMAGE_MAGICK_FILE" echo "-----> Downloading ImageMagick from $IMAGE_MAGICK_URL" -wget $IMAGE_MAGICK_URL -P $BUILD_DIR | indent +wget --no-check-certificate $IMAGE_MAGICK_URL -P $BUILD_DIR | indent echo "-----> Extracting ImageMagick from $BUILD_DIR/$IMAGE_MAGICK_FILE" if [ ! -f $BUILD_DIR/$IMAGE_MAGICK_FILE ]; then