Sha256: 193db4d1231b3d62386c633b99c5920fa5b2fa0b5c54e0ff3e7ca7164bec44da

Contents?: true

Size: 310 Bytes

Versions: 12

Compression:

Stored size: 310 Bytes

Contents

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

    def create?
      @user.thredded_admin?
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
thredded-0.12.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.12.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.11.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.11.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.10.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.10.0 app/policies/thredded/messageboard_group_policy.rb
thredded-0.9.4 app/policies/thredded/messageboard_group_policy.rb
thredded-0.9.3 app/policies/thredded/messageboard_group_policy.rb
thredded-0.9.2 app/policies/thredded/messageboard_group_policy.rb
thredded-0.9.1 app/policies/thredded/messageboard_group_policy.rb
thredded-0.8.4 app/policies/thredded/messageboard_group_policy.rb
thredded-0.8.2 app/policies/thredded/messageboard_group_policy.rb