zendesk_apps_support 4.40.0 → 4.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4b57610d473248babf721ef9edd4adff8a6fb96aea6d3e323f3a6919d19f49
|
4
|
+
data.tar.gz: d2bc43a0736ebe9950423d77d5adba5549d83dab35671aae797d78233b7128ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc6ab57adfa809e876b5fd03ade9fefd683a7d64fb65d4d44da6d03b4b1f5a4feacbfacf710b50281bbcaa890c91355742ece1e67384b4ce2d3569406ef24525
|
7
|
+
data.tar.gz: da3d8aceccf0e66f308718ecdc469e7d632ece824b578e6ec38b67e34ccb0577eeed3e7c35cba7068c9d5ce35ec8bd3184fa28054705470b17bcef4c7837c139
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
Classes to manage and validate Zendesk Apps. This is a gem used in [Zendesk Apps Tools](https://github.com/zendesk/zendesk_apps_tools/).
|
5
5
|
|
6
6
|
## Owners
|
7
|
-
This repo is owned and maintained by the Zendesk Apps team. You can reach us on
|
7
|
+
This repo is owned and maintained by the Zendesk Apps team. You can reach us on wattle@zendesk.com. We are located in Melbourne!
|
8
8
|
|
9
9
|
## Getting Started
|
10
10
|
When you want to help **develop** this tool, you will need to clone this repo.
|
@@ -16,7 +16,7 @@ This project uses Rspec, which can be run with `bundle exec rake`.
|
|
16
16
|
|
17
17
|
## Contribute
|
18
18
|
* Put up a PR into the master branch.
|
19
|
-
* CC and get two +1 from @zendesk/wattle
|
19
|
+
* CC and get two +1 from @zendesk/wattle.
|
20
20
|
|
21
21
|
## Bugs
|
22
22
|
Bugs can be reported as an issue here on github, or submitted to support@zendesk.com. By mentioning this project it will assigned to the right team.
|
data/config/locales/en.yml
CHANGED
@@ -123,6 +123,8 @@ en:
|
|
123
123
|
for %{product}: %{missing_key}'
|
124
124
|
products_do_not_match_manifest_products: Products in manifest (%{manifest_products})
|
125
125
|
do not match products in translations (%{translation_products})
|
126
|
+
password_parameter_deprecated: 'Password parameter type is deprecated and will not
|
127
|
+
be accepted in the future. Use Basic Access Authentication instead. Learn more: %{link}.'
|
126
128
|
insecure_token_parameter_in_manifest: 'Make sure to set secure to true
|
127
129
|
when using keys in Settings. Learn more: %{link}'
|
128
130
|
default_secure_or_hidden_parameter_in_manifest: Default values for secure
|
@@ -149,6 +151,8 @@ en:
|
|
149
151
|
oauth_parameter_cannot_be_secure: oauth parameter cannot be set to be
|
150
152
|
secure.
|
151
153
|
invalid_url: '%{field} must be a valid URL, got "%{value}".'
|
154
|
+
password_parameter_type_deprecated: 'Password parameter type can no longer
|
155
|
+
be used. Use Secure settings instead. Learn more: %{link}.'
|
152
156
|
warning:
|
153
157
|
app_build:
|
154
158
|
deprecated_version: You are targeting a deprecated version of the framework.
|
@@ -354,6 +354,11 @@ parts:
|
|
354
354
|
title: "Validation message to indicate missing secure(true) field in manifest's token parameter. Do not translate 'secure' and 'true'. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
|
355
355
|
value: "Make sure to set secure to true when using keys in Settings. Learn more: %{link}"
|
356
356
|
screenshot: "https://drive.google.com/open?id=1ss3nNN2RG29R7StjCtiH8qjuwFBlRApJ"
|
357
|
+
- translation:
|
358
|
+
key: "txt.apps.admin.error.app_build.translation.password_parameter_deprecated"
|
359
|
+
title: "Validation message to indicate deprecated password parameter is being used. Do not translate 'Password'."
|
360
|
+
value: "Password parameter type is deprecated and will not be accepted in the future. Use Basic Access Authentication instead. Learn more: %{link}."
|
361
|
+
screenshot: "https://drive.google.com/file/d/1S2cecD3h1pIoc5mpG-D966B0gHNlRvhz"
|
357
362
|
- translation:
|
358
363
|
key: "txt.apps.admin.error.app_build.translation.default_secure_or_hidden_parameter_in_manifest"
|
359
364
|
title: "Validation message to indicate that a hidden or secure manifest parameter has a default value. Do not translate 'secure' and 'hidden'. Secure(true) in manifest refers to https://developer.zendesk.com/apps/docs/developer-guide/using_sdk#using-secure-settings"
|
@@ -415,3 +420,7 @@ parts:
|
|
415
420
|
key: "txt.apps.admin.error.app_build.invalid_url"
|
416
421
|
title: "App builder job: this value needs to be a valid URL, but something else was passed in. placeholder value is taken from user input. You can translate as: The value %{field} must be a valid URL... to avoid any gender issues."
|
417
422
|
value: "%{field} must be a valid URL, got \"%{value}\"."
|
423
|
+
- translation:
|
424
|
+
key: "txt.apps.admin.error.app_build.password_parameter_type_deprecated"
|
425
|
+
title: "App builder job: Password parameter type is deprecated"
|
426
|
+
value: "Password parameter type can no longer be used. Use Secure settings instead. Learn more: %{link}."
|
@@ -31,9 +31,9 @@ module ZendeskAppsSupport
|
|
31
31
|
@warnings = []
|
32
32
|
end
|
33
33
|
|
34
|
-
def validate(marketplace: true, skip_marketplace_translations: false)
|
34
|
+
def validate(marketplace: true, skip_marketplace_translations: false, error_on_password_parameter: false)
|
35
35
|
errors = []
|
36
|
-
errors << Validations::Manifest.call(self)
|
36
|
+
errors << Validations::Manifest.call(self, error_on_password_parameter: error_on_password_parameter)
|
37
37
|
|
38
38
|
if has_valid_manifest?(errors)
|
39
39
|
errors << Validations::Marketplace.call(self) if marketplace
|
@@ -61,8 +61,8 @@ module ZendeskAppsSupport
|
|
61
61
|
errors.flatten.compact
|
62
62
|
end
|
63
63
|
|
64
|
-
def validate!(marketplace: true, skip_marketplace_translations: false)
|
65
|
-
errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations)
|
64
|
+
def validate!(marketplace: true, skip_marketplace_translations: false, error_on_password_parameter: false)
|
65
|
+
errors = validate(marketplace: marketplace, skip_marketplace_translations: skip_marketplace_translations, error_on_password_parameter: error_on_password_parameter)
|
66
66
|
raise errors.first if errors.any?
|
67
67
|
true
|
68
68
|
end
|
@@ -13,7 +13,7 @@ module ZendeskAppsSupport
|
|
13
13
|
OAUTH_MANIFEST_LINK = 'https://developer.zendesk.com/apps/docs/developer-guide/manifest#oauth'
|
14
14
|
|
15
15
|
class << self
|
16
|
-
def call(package)
|
16
|
+
def call(package, error_on_password_parameter: false)
|
17
17
|
unless package.has_file?('manifest.json')
|
18
18
|
nested_manifest = package.files.find { |file| file =~ %r{\A[^/]+?/manifest\.json\Z} }
|
19
19
|
if nested_manifest
|
@@ -22,7 +22,9 @@ module ZendeskAppsSupport
|
|
22
22
|
return [ValidationError.new(:missing_manifest)]
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
package.warnings << password_parameter_warning unless error_on_password_parameter
|
26
|
+
|
27
|
+
collate_manifest_errors(package, error_on_password_parameter)
|
26
28
|
rescue JSON::ParserError => e
|
27
29
|
return [ValidationError.new(:manifest_not_json, errors: e)]
|
28
30
|
rescue ZendeskAppsSupport::Manifest::OverrideError => e
|
@@ -31,7 +33,7 @@ module ZendeskAppsSupport
|
|
31
33
|
|
32
34
|
private
|
33
35
|
|
34
|
-
def collate_manifest_errors(package)
|
36
|
+
def collate_manifest_errors(package, error_on_password_parameter)
|
35
37
|
manifest = package.manifest
|
36
38
|
|
37
39
|
errors = [
|
@@ -49,7 +51,10 @@ module ZendeskAppsSupport
|
|
49
51
|
missing_framework_version(manifest),
|
50
52
|
invalid_version_error(manifest) ]
|
51
53
|
end,
|
52
|
-
ban_no_template(manifest)
|
54
|
+
ban_no_template(manifest),
|
55
|
+
if error_on_password_parameter
|
56
|
+
[ deprecate_password_parameter_type(manifest) ]
|
57
|
+
end
|
53
58
|
]
|
54
59
|
errors.flatten.compact
|
55
60
|
end
|
@@ -207,6 +212,13 @@ module ZendeskAppsSupport
|
|
207
212
|
ValidationError.new(:no_framework_version_required) unless manifest.framework_version.nil?
|
208
213
|
end
|
209
214
|
|
215
|
+
def deprecate_password_parameter_type(manifest)
|
216
|
+
secure_settings_link = 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-secure-settings'
|
217
|
+
if manifest.parameters.any? { |p| p.type == 'password' }
|
218
|
+
ValidationError.new(:password_parameter_type_deprecated, link: secure_settings_link)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
210
222
|
def private_marketing_app_error(manifest)
|
211
223
|
ValidationError.new(:marketing_only_app_cant_be_private) if manifest.private?
|
212
224
|
end
|
@@ -439,6 +451,13 @@ module ZendeskAppsSupport
|
|
439
451
|
rescue URI::InvalidURIError
|
440
452
|
false
|
441
453
|
end
|
454
|
+
|
455
|
+
def password_parameter_warning
|
456
|
+
I18n.t(
|
457
|
+
'txt.apps.admin.error.app_build.translation.password_parameter_deprecated',
|
458
|
+
link: 'https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-basic-access-authentication'
|
459
|
+
)
|
460
|
+
end
|
442
461
|
end
|
443
462
|
end
|
444
463
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_apps_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.42.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
8
8
|
- Likun Liu
|
9
9
|
- Sean Caffery
|
10
10
|
- Daniel Ribeiro
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2025-04-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|
@@ -338,7 +338,7 @@ homepage: http://github.com/zendesk/zendesk_apps_support
|
|
338
338
|
licenses:
|
339
339
|
- Apache License Version 2.0
|
340
340
|
metadata: {}
|
341
|
-
post_install_message:
|
341
|
+
post_install_message:
|
342
342
|
rdoc_options: []
|
343
343
|
require_paths:
|
344
344
|
- lib
|
@@ -353,8 +353,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
353
|
- !ruby/object:Gem::Version
|
354
354
|
version: 1.3.6
|
355
355
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
357
|
-
signing_key:
|
356
|
+
rubygems_version: 3.5.22
|
357
|
+
signing_key:
|
358
358
|
specification_version: 4
|
359
359
|
summary: Support to help you develop Zendesk Apps.
|
360
360
|
test_files: []
|