diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rb index 8105e3a86..53bb79564 100644 --- a/app/controllers/concerns/authentication.rb +++ b/app/controllers/concerns/authentication.rb @@ -2,8 +2,6 @@ module Authentication extend ActiveSupport::Concern included do - prepend_before_action :clear_old_scoped_session_cookies - before_action :require_account # Checking and setting account must happen first before_action :require_authentication helper_method :authenticated? @@ -20,9 +18,9 @@ module Authentication end def allow_unauthenticated_access(**options) + @unauthenticated_access_allowed = true skip_before_action :require_authentication, **options before_action :resume_session, **options - allow_unauthorized_access **options end def disallow_account_scope(**options) @@ -54,13 +52,6 @@ module Authentication end end - # FIXME: Remove before launch - def clear_old_scoped_session_cookies - if request.script_name.present? && cookies.signed[:session_token].present? && !find_session_by_cookie - cookies.signed[:session_token] = { value: "invalid-session-token", path: request.script_name, expires: 1.hour.ago } - end - end - def find_session_by_cookie Session.find_signed(cookies.signed[:session_token]) end diff --git a/app/controllers/memberships/unlink_controller.rb b/app/controllers/memberships/unlink_controller.rb deleted file mode 100644 index 2c140c314..000000000 --- a/app/controllers/memberships/unlink_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Memberships::UnlinkController < ApplicationController - disallow_account_scope - before_action :set_membership - - def show - end - - def create - @membership.destroy - redirect_to session_menu_path - end - - private - def set_membership - @membership = Current.identity.memberships.find_signed!(params[:membership_id], purpose: :unlinking) - end -end diff --git a/app/views/memberships/unlink/show.html.erb b/app/views/memberships/unlink/show.html.erb deleted file mode 100644 index 275b3582e..000000000 --- a/app/views/memberships/unlink/show.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% @page_title = "Leaving #{@membership.account_name}" %> - -
You no longer have access to this account.
-