Sha256: 093e3111da403c0c758db78abfc42c754e95322fb10c7474077b060695086192
Contents?: true
Size: 496 Bytes
Versions: 7
Compression:
Stored size: 496 Bytes
Contents
module Samvera module Persona module AvalonAuth extend ActiveSupport::Concern included do before_action :auth end def auth if current_user.nil? flash[:notice] = "You need to login to manage users" redirect_to main_app.new_user_session_path elsif cannot? :manage, User flash[:notice] = "You do not have permission to manage users" redirect_to main_app.root_path end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems