Skip to content

Commit

Permalink
Fixing docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyf committed Apr 16, 2024
1 parent c0bc4f7 commit 1290e60
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-guests (0.8.1)
devise-guests (0.8.2)
devise
devise-i18n (1.12.0)
devise (>= 4.9.0)
Expand Down
2 changes: 0 additions & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
//= require dataTables.bootstrap4
//= require cropper.min

//= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
//= require stat_slider
//= require turbolinks
//= require cocoon
Expand Down
6 changes: 3 additions & 3 deletions app/assets/stylesheets/themes/cultural_repository.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
body.dashboard {
padding-top: 100px !important;

@media (max-width: $screen-md-min) {
@media (max-width: 992px) {
padding-top: 0 !important;
}

Expand Down Expand Up @@ -162,7 +162,7 @@
.facet-panel-background-color {
background-color: #ffffff;

@media (max-width: $screen-md-min) {
@media (max-width: 992px) {
background-color: transparent;
}

Expand Down Expand Up @@ -255,7 +255,7 @@
}
}

@media screen and (max-width: $screen-md-min) {
@media screen and (max-width: 992px) {
div.recently-uploaded:nth-of-type(2n+3),
div.featured-works-6-column-layout:nth-of-type(2n+3),
div.featured-works-4-column-layout:nth-of-type(2n+3) {
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/themes/neutral_repository.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@

////// Media Queries //////

@media (max-width: $screen-md-min) {
@media (max-width: 992px) {
div.neutral-repository-collections:nth-of-type(2n+3) {
clear: left;
}
}

@media (min-width: $screen-md-min) {
@media (min-width: 992px) {
div.neutral-repository-collections:nth-of-type(3n+4) {
clear: left;
}
Expand Down
37 changes: 19 additions & 18 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,6 @@ def hidden?
current_account.persisted? && !current_account.is_public?
end

# Override method from devise-guests v0.7.0 to prevent the application
# from attempting to create duplicate guest users
def guest_user
return @guest_user if @guest_user
if session[:guest_user_id]
# Override - added #unscoped to include guest users who are filtered out of User queries by default
@guest_user = User.unscoped.find_by(User.authentication_keys.first => session[:guest_user_id]) rescue nil
@guest_user = nil if @guest_user.respond_to? :guest and !@guest_user.guest
end
@guest_user ||= begin
u = create_guest_user(session[:guest_user_id])
session[:guest_user_id] = u.send(User.authentication_keys.first)
u
end
@guest_user
end


def api_or_pdf?
request.format.to_s.match('json') ||
params[:print] ||
Expand Down Expand Up @@ -90,6 +72,25 @@ def super_and_current_users
users
end

# Override method from devise-guests v0.8.2 to prevent the application from
# attempting to create duplicate guest users; namely by adding the
# User.unscoped
def guest_user
return @guest_user if @guest_user
if session[:guest_user_id]
# Override - added #unscoped to include guest users who are filtered out of User queries by default
@guest_user = User.unscoped.find_by(User.authentication_keys.first => session[:guest_user_id]) rescue nil
@guest_user = nil if @guest_user.respond_to? :guest and !@guest_user.guest
end
@guest_user ||= begin
u = create_guest_user(session[:guest_user_id])
session[:guest_user_id] = u.send(User.authentication_keys.first)
u
end
@guest_user
end


private

def require_active_account!
Expand Down

0 comments on commit 1290e60

Please sign in to comment.