Sha256: 41cad75e43faa3caab6936578a915d451df4f067e46e86faaf22331dce877d27
Contents?: true
Size: 358 Bytes
Versions: 3
Compression:
Stored size: 358 Bytes
Contents
# frozen_string_literal: true module Auxilium module Concerns module AdminAuthenticated extend ActiveSupport::Concern def admin_authenticated authenticate_user! redirect_to root_path unless current_user.has_role?(:admin) end included do before_action :admin_authenticated end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
auxilium-3.0.31 | lib/auxilium/concerns/admin_authenticated.rb |
auxilium-3.0.30 | lib/auxilium/concerns/admin_authenticated.rb |
auxilium-3.0.24 | lib/auxilium/concerns/admin_authenticated.rb |