Sha256: c11aaad462f06f8d9878542151c8e1c6801a4e30749165f79f1bb57e9f3bd368

Contents?: true

Size: 374 Bytes

Versions: 32

Compression:

Stored size: 374 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 current_user.can_be_superuser?
      session[:superuser_mode] = true
    end
    redirect_to :back
  end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
hydra-head-4.0.1 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0.rc6 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0.rc5 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0.rc4 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0.rc3 app/controllers/user_sessions_controller.rb
hydra-head-4.0.0.rc2 app/controllers/user_sessions_controller.rb
hydra-head-3.3.0 app/controllers/user_sessions_controller.rb
hydra-head-3.2.2 app/controllers/user_sessions_controller.rb
hydra-head-3.2.1 app/controllers/user_sessions_controller.rb
hydra-head-3.2.0 app/controllers/user_sessions_controller.rb
hydra-head-3.2.0.pre3 app/controllers/user_sessions_controller.rb
hydra-head-3.2.0.pre2 app/controllers/user_sessions_controller.rb
hydra-head-3.2.0.pre1 app/controllers/user_sessions_controller.rb
hydra-head-3.1.5 app/controllers/user_sessions_controller.rb
hydra-head-3.1.4 app/controllers/user_sessions_controller.rb
hydra-head-3.1.3 app/controllers/user_sessions_controller.rb
hydra-head-3.1.2 app/controllers/user_sessions_controller.rb
hydra-head-3.1.1 app/controllers/user_sessions_controller.rb
hydra-head-3.1.0 app/controllers/user_sessions_controller.rb