5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 13:56:21 +00:00

feat: almacenar la llave privada

This commit is contained in:
f 2023-08-29 17:43:19 -03:00
parent c09dfc3b67
commit d96de873a7
3 changed files with 22 additions and 0 deletions

View file

@ -10,6 +10,7 @@ class Site < ApplicationRecord
include Site::DeployDependencies
include Site::BuildStats
include Site::LayoutOrdering
include Site::SocialDistributedPress
include Tienda
# Cifrar la llave privada que cifra y decifra campos ocultos. Sutty

View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
class Site
# Agrega soporte para Social Distributed Press en los sitios
module SocialDistributedPress
extend ActiveSupport::Concern
included do
encrypts :private_key_pem
end
end
end

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
# Almacena las llaves privadas de cada sitio
class AddPrivateKeyPemCiphertextToSites < ActiveRecord::Migration[6.1]
# Agrega la columna cifrada
def change
add_column :sites, :private_key_pem_ciphertext, :text
end
end