Sha256: a4b84859f8bcb6f5f13838a5f5fef5ae4c3406021954d7aa0f7c7daf4e8d3b48

Contents?: true

Size: 315 Bytes

Versions: 20

Compression:

Stored size: 315 Bytes

Contents

class MessageTemplatePolicy < ApplicationPolicy
  def index?
    true if user.try(:has_role?, 'Librarian')
  end

  def show?
    true if user.try(:has_role?, 'Librarian')
  end

  def create?
    false
  end

  def update?
    true if user.try(:has_role?, 'Administator')
  end

  def destroy?
    false
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
enju_message-0.3.4 app/policies/message_template_policy.rb
enju_message-0.3.3 app/policies/message_template_policy.rb
enju_message-0.4.0.rc.1 app/policies/message_template_policy.rb
enju_message-0.3.2 app/policies/message_template_policy.rb
enju_message-0.4.0.beta.2 app/policies/message_template_policy.rb
enju_message-0.4.0.beta.1 app/policies/message_template_policy.rb
enju_message-0.3.1 app/policies/message_template_policy.rb
enju_message-0.3.0 app/policies/message_template_policy.rb
enju_message-0.3.0.rc.1 app/policies/message_template_policy.rb
enju_message-0.3.0.beta.1 app/policies/message_template_policy.rb
enju_message-0.2.4 app/policies/message_template_policy.rb
enju_message-0.2.3 app/policies/message_template_policy.rb
enju_message-0.2.2 app/policies/message_template_policy.rb
enju_message-0.2.1 app/policies/message_template_policy.rb
enju_message-0.2.0 app/policies/message_template_policy.rb
enju_message-0.2.0.beta.5 app/policies/message_template_policy.rb
enju_message-0.2.0.beta.4 app/policies/message_template_policy.rb
enju_message-0.2.0.beta.3 app/policies/message_template_policy.rb
enju_message-0.2.0.beta.2 app/policies/message_template_policy.rb
enju_message-0.2.0.beta.1 app/policies/message_template_policy.rb