Skip to content

Commit

Permalink
Merge pull request #10 from IUBLibTech/iulrdc-17_drop_login_link
Browse files Browse the repository at this point in the history
remove login link from toolbar
  • Loading branch information
dlpierce authored Oct 11, 2024
2 parents 964f59c + 9299365 commit b149faf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,4 @@ gem 'riiif', '~> 2.1'

gem 'localhost'
gem 'redcarpet'
gem 'repost'
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ GEM
regexp_parser (2.9.0)
reline (0.5.2)
io-console (~> 0.5)
repost (0.4.2)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand Down Expand Up @@ -987,6 +988,7 @@ DEPENDENCIES
rack-mini-profiler (~> 2.0)
rails (~> 6.1.7, >= 6.1.7.7)
redcarpet
repost
riiif (~> 2.1)
rsolr (>= 1.0, < 3)
rspec-rails
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ class ApplicationController < ActionController::Base
include Hyrax::ThemedLayoutController
with_themed_layout '1_column'


def login
redirect_post('/users/auth/cas', options: {authenticity_token: :auto})
end
end
6 changes: 1 addition & 5 deletions app/views/_user_util_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
</div>
</li>
<% else %>
<li class="nav-item">
<%= link_to main_app.user_cas_omniauth_authorize_path, method: :post, class: 'nav-link' do %>
<span class="fa fa-sign-in" aria-hidden="true"></span> <%= t("hyrax.toolbar.profile.login") %>
<% end %>
</li>
<%# drop login link %>
<% end %>
</ul>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@
delete 'clear'
end
end

get '/login', to: 'application#login', as: 'login_url'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end

0 comments on commit b149faf

Please sign in to comment.