Files
ubicloud/model/postgres/postgres_firewall_rule.rb
Jeremy Evans 68fbce5902 Replace Dataset#authorized with Authorization.dataset_authorize
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.
2025-01-09 09:55:55 -08:00

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)