mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 10:26:21 +00:00
feat: almacenar la llave privada
This commit is contained in:
parent
ef64dbc049
commit
c6c638fb60
3 changed files with 22 additions and 0 deletions
|
@ -10,6 +10,7 @@ class Site < ApplicationRecord
|
||||||
include Site::DeployDependencies
|
include Site::DeployDependencies
|
||||||
include Site::BuildStats
|
include Site::BuildStats
|
||||||
include Site::LayoutOrdering
|
include Site::LayoutOrdering
|
||||||
|
include Site::SocialDistributedPress
|
||||||
include Tienda
|
include Tienda
|
||||||
|
|
||||||
# Cifrar la llave privada que cifra y decifra campos ocultos. Sutty
|
# Cifrar la llave privada que cifra y decifra campos ocultos. Sutty
|
||||||
|
|
12
app/models/site/social_distributed_press.rb
Normal file
12
app/models/site/social_distributed_press.rb
Normal 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
|
|
@ -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
|
Loading…
Reference in a new issue