Sha256: 25c7d60ed023fda50317ada55af4e3b7f5943be4129da65d9816ca55817f62d2
Contents?: true
Size: 515 Bytes
Versions: 49
Compression:
Stored size: 515 Bytes
Contents
# frozen_string_literal: true module Decidim module Comments module Abilities # Defines the abilities related to comments for a logged in user. # Intended to be used with `cancancan`. class CurrentUserAbility include CanCan::Ability attr_reader :user, :context def initialize(user, context) return unless user @user = user @context = context can :report, Decidim::Comments::Comment end end end end end
Version data entries
49 entries across 49 versions & 2 rubygems