Sha256: 519a09b2657e88b11631966588cf70c6d640d8063418414d161f57e34b912906

Contents?: true

Size: 323 Bytes

Versions: 8

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true
module Thredded
  class MessageboardGroupPolicy
    # @param user [Thredded.user_class]
    # @param messageboard_group [Thredded::MessageboardGroup]
    def initialize(user, group)
      @user = user
      @group = group
    end

    def create?
      @user.thredded_admin?
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
thredded-0.7.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.6.3 app/policies/thredded/messageboard_group_policy.rb
thredded-0.6.2 app/policies/thredded/messageboard_group_policy.rb
thredded-0.6.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.6.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.5.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.5.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.4.0 app/policies/thredded/messageboard_group_policy.rb