Sha256: 7078c5937b6e578a7eaf9b13bdac4ea079320bf308e52bd75673a0dcb0ee352f

Contents?: true

Size: 426 Bytes

Versions: 6

Compression:

Stored size: 426 Bytes

Contents

class UserSessionsController < ApplicationController
  # toggle to set superuser_mode in session
  # Only allows user who can be superusers to set this value in session
  def superuser
    if session[:superuser_mode]
      session[:superuser_mode] = nil
    elsif Deprecation.silence(Hydra::SuperuserAttributes) { current_user.can_be_superuser? }
      session[:superuser_mode] = true
    end
    redirect_to :back
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hydra-head-4.1.3 app/controllers/user_sessions_controller.rb
hydra-head-4.1.2 app/controllers/user_sessions_controller.rb
hydra-head-4.1.1 app/controllers/user_sessions_controller.rb
hydra-head-4.1.0 app/controllers/user_sessions_controller.rb
hydra-head-4.0.3 app/controllers/user_sessions_controller.rb
hydra-head-4.0.2 app/controllers/user_sessions_controller.rb