This should prevent muscle memory problems where developers call authorize on the dataset instead of using Clover#dataset_authorize. Calling Dataset#authorize directly with the current account id causes security issues as it does not respect token permissions.
21 lines
700 B
Ruby
21 lines
700 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../../model"
|
|
|
|
class PostgresFirewallRule < Sequel::Model
|
|
many_to_one :postgres_resource, key: :postgres_resource_id
|
|
|
|
include ResourceMethods
|
|
end
|
|
|
|
# Table: postgres_firewall_rule
|
|
# Columns:
|
|
# id | uuid | PRIMARY KEY
|
|
# cidr | cidr | NOT NULL
|
|
# postgres_resource_id | uuid | NOT NULL
|
|
# Indexes:
|
|
# postgres_firewall_rule_pkey | PRIMARY KEY btree (id)
|
|
# postgres_firewall_rule_postgres_resource_id_cidr_key | UNIQUE btree (postgres_resource_id, cidr)
|
|
# Foreign key constraints:
|
|
# postgres_firewall_rule_postgres_resource_id_fkey | (postgres_resource_id) REFERENCES postgres_resource(id)
|