Addon build working

This commit is contained in:
Darren Clarke 2023-05-10 09:34:18 +00:00
parent 6fca9c704f
commit 60e590f75c
22 changed files with 141 additions and 475 deletions

View file

@ -1,10 +1,11 @@
{
"name": "zammad-addon-pgp",
"displayName": "PGP Support",
"version": "2.0.0",
"description": "Adds PGP integration into [Zammad](https://zammad.org) via [Sequoia](https://sequoia-pgp.org).",
"scripts": {
"build": "zpm-build",
"migrate": "zpm-migrate"
"build": "node ../../node_modules/zammad-addon-common/dist/build.js",
"migrate": "node ../../node_modules/zammad-addon-common/dist/migrate.js"
},
"dependencies": {
"zammad-addon-common": "*"

View file

@ -1,65 +0,0 @@
class PGPSupport < ActiveRecord::Migration[5.2]
def up
# return if it's a new setup
# return unless Setting.exists?(name: 'system_init_done')
Setting.create_if_not_exists(
title: 'PGP integration',
name: 'pgp_integration',
area: 'Integration::Switch',
description: 'Defines if PGP encryption is enabled or not.',
options: {
form: [
{
display: '',
null: true,
name: 'pgp_integration',
tag: 'boolean',
options: {
true => 'yes',
false => 'no'
}
}
]
},
state: false,
preferences: {
prio: 1,
authentication: true,
permission: ['admin.integration']
},
frontend: true
)
Setting.create_if_not_exists(
title: 'PGP config',
name: 'pgp_config',
area: 'Integration::PGP',
description: 'Defines the PGP config.',
options: {},
state: {},
preferences: {
prio: 2,
permission: ['admin.integration']
},
frontend: true
)
Setting.create_if_not_exists(
title: 'Defines postmaster filter.',
name: '0016_postmaster_filter_smime',
area: 'Postmaster::PreFilter',
description: 'Defines postmaster filter to handle secure mailing.',
options: {},
state: 'Channel::Filter::SecureMailing',
frontend: false
)
create_table :pgp_keypairs do |t|
t.string :fingerprint, limit: 250, null: false
t.binary :public_key, limit: 10.megabytes, null: false
t.binary :private_key, limit: 10.megabytes, null: true
t.string :private_key_secret, limit: 500, null: true
t.timestamps limit: 3, null: false
end
add_index :pgp_keypairs, [:fingerprint], unique: true
end
end