Sha256: f7ec8625789418110f1536e9c55bfb68e47630fcb01dda6fe3823aa1fa519bf9
Contents?: true
Size: 342 Bytes
Versions: 2
Compression:
Stored size: 342 Bytes
Contents
class Shared::EnsureUserNotDisabledPrecondition < BasePrecondition delegate :current_user, :current_ability, to: :action def perform if current_user && current_user.disabled && !current_ability.can?(:manage, :all) return view_builder.build(Defaults::ForbiddenView, errors: ['Your account has been disabled']) end end end
Version data entries
2 entries across 2 versions & 1 rubygems