libertarian-party/partynest

View on GitHub
app/policies/settings/contact_security_notification_switch_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class Settings::ContactSecurityNotificationSwitchPolicy < ApplicationPolicy
  def create?
    account &&
      record.contact.contact_list.account == account &&
      record.contact.contact_network_communicable?
  end
end