zendesk_apps_support 4.29.2 → 4.29.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dba69f9baf26e1f28d4cd6538eb63d67f9f182b04469cb3ab6d9b02f69579081
|
4
|
+
data.tar.gz: 29a12f5b4f0dc4f24d9f92fe3654050ca2f20f3d3036353b411024053db94a86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf68d496dfb03184b5e2065e35e13d87c6baa932809d91963c72c836142eb23b3c487d74fb0a434a0fa4345563886e9b8dd456080ee3fd805e8b7d8a993d534d
|
7
|
+
data.tar.gz: 29d5b553e3df6fdae73ac4185c41023185c8a1cc52de1733faa0977ea90d0be481cd3f2a0c66152823ffacf35f6547516f8308018ddbe5e333349d6f798adb2d
|
data/config/locales/en.yml
CHANGED
@@ -62,7 +62,6 @@ en:
|
|
62
62
|
other: Unsupported MIME types detected in %{file_names}.
|
63
63
|
multiple_channel_integrations: Specifying multiple channel integrations
|
64
64
|
in requirements.json is not supported.
|
65
|
-
too_many_oauth_parameters: "Too many parameters with type 'oauth': one permitted"
|
66
65
|
invalid_cr_schema_keys:
|
67
66
|
one: 'Custom resources schema contains an invalid key: %{invalid_keys}'
|
68
67
|
other: 'Custom resources schema contains invalid keys: %{invalid_keys}'
|
@@ -78,6 +77,8 @@ en:
|
|
78
77
|
missing:
|
79
78
|
one: 'Missing required oauth field in manifest: %{missing_keys}'
|
80
79
|
other: 'Missing required oauth fields in manifest: %{missing_keys}'
|
80
|
+
too_many_oauth_parameters: 'Too many parameters with type ''oauth'': one
|
81
|
+
permitted'
|
81
82
|
missing_source: Could not find app.js
|
82
83
|
style_in_template: "<style> tag in %{template}. Use an app.css file instead."
|
83
84
|
no_code_for_ifo_notemplate: Javascripts, stylesheets, and templates are
|
@@ -139,6 +140,8 @@ en:
|
|
139
140
|
invalid_v1_location:
|
140
141
|
one: "%{invalid_locations} is an invalid location in framework v1."
|
141
142
|
other: "%{invalid_locations} are invalid locations in framework v1."
|
143
|
+
oauth_parameter_cannot_be_secure: oauth parameter cannot be set to be
|
144
|
+
secure.
|
142
145
|
warning:
|
143
146
|
app_build:
|
144
147
|
deprecated_version: You are targeting a deprecated version of the framework.
|
@@ -399,3 +399,7 @@ parts:
|
|
399
399
|
key: "txt.apps.admin.error.app_build.invalid_v1_location.other"
|
400
400
|
title: "The locations listed are not available in framework v1."
|
401
401
|
value: "%{invalid_locations} are invalid locations in framework v1."
|
402
|
+
- translation:
|
403
|
+
key: "txt.apps.admin.error.app_build.oauth_parameter_cannot_be_secure"
|
404
|
+
title: "oauth parameter cannot be set to be secure."
|
405
|
+
value: "oauth parameter cannot be set to be secure."
|
@@ -33,51 +33,71 @@ module ZendeskAppsSupport
|
|
33
33
|
def collate_manifest_errors(package)
|
34
34
|
manifest = package.manifest
|
35
35
|
|
36
|
-
errors = [
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
errors = [
|
37
|
+
missing_keys_error(manifest),
|
38
|
+
type_checks(manifest),
|
39
|
+
oauth_error(manifest),
|
40
|
+
default_locale_error(manifest, package),
|
41
|
+
validate_parameters(manifest),
|
42
|
+
if manifest.requirements_only? || manifest.marketing_only?
|
43
|
+
[ ban_location(manifest),
|
44
|
+
ban_framework_version(manifest) ]
|
45
|
+
else
|
46
|
+
[ validate_location(package),
|
47
|
+
missing_framework_version(manifest),
|
48
|
+
invalid_version_error(manifest) ]
|
49
|
+
end,
|
50
|
+
ban_no_template(manifest)
|
51
|
+
]
|
52
|
+
errors.flatten.compact
|
53
|
+
end
|
41
54
|
|
55
|
+
def validate_location(package)
|
56
|
+
manifest = package.manifest
|
57
|
+
[
|
58
|
+
missing_location_error(package),
|
59
|
+
invalid_location_error(package),
|
60
|
+
invalid_v1_location(package),
|
61
|
+
location_framework_mismatch(manifest)
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
def validate_parameters(manifest)
|
42
66
|
if manifest.marketing_only?
|
43
|
-
|
67
|
+
marketing_only_errors(manifest)
|
44
68
|
else
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
69
|
+
[
|
70
|
+
parameters_error(manifest),
|
71
|
+
invalid_hidden_parameter_error(manifest),
|
72
|
+
invalid_type_error(manifest),
|
73
|
+
too_many_oauth_parameters(manifest),
|
74
|
+
oauth_cannot_be_secure(manifest),
|
75
|
+
name_as_parameter_name_error(manifest)
|
76
|
+
]
|
50
77
|
end
|
78
|
+
end
|
51
79
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
errors << invalid_location_error(package)
|
58
|
-
errors << invalid_v1_location(package)
|
59
|
-
errors << missing_framework_version(manifest)
|
60
|
-
errors << location_framework_mismatch(manifest)
|
61
|
-
errors << invalid_version_error(manifest)
|
80
|
+
def oauth_cannot_be_secure(manifest)
|
81
|
+
manifest.parameters.map do |parameter|
|
82
|
+
if parameter.type == 'oauth' && parameter.secure
|
83
|
+
return ValidationError.new('oauth_parameter_cannot_be_secure')
|
84
|
+
end
|
62
85
|
end
|
63
|
-
|
64
|
-
errors << ban_no_template(manifest) if manifest.iframe_only?
|
65
|
-
|
66
|
-
errors.flatten.compact
|
67
86
|
end
|
68
87
|
|
69
88
|
def marketing_only_errors(manifest)
|
70
|
-
[
|
71
|
-
|
72
|
-
|
73
|
-
|
89
|
+
[
|
90
|
+
ban_parameters(manifest),
|
91
|
+
private_marketing_app_error(manifest)
|
92
|
+
]
|
74
93
|
end
|
75
94
|
|
76
95
|
def type_checks(manifest)
|
77
|
-
errors = [
|
78
|
-
|
79
|
-
|
80
|
-
|
96
|
+
errors = [
|
97
|
+
boolean_error(manifest),
|
98
|
+
string_error(manifest),
|
99
|
+
no_template_format_error(manifest)
|
100
|
+
]
|
81
101
|
unless manifest.experiments.is_a?(Hash)
|
82
102
|
errors << ValidationError.new(
|
83
103
|
:unacceptable_hash,
|
@@ -152,6 +172,7 @@ module ZendeskAppsSupport
|
|
152
172
|
end
|
153
173
|
|
154
174
|
def ban_no_template(manifest)
|
175
|
+
return unless manifest.iframe_only?
|
155
176
|
no_template_migration_link = 'https://developer.zendesk.com/apps/docs/apps-v2/manifest#location'
|
156
177
|
if manifest.no_template? || !manifest.no_template_locations.empty?
|
157
178
|
ValidationError.new(:no_template_deprecated_in_v2, link: no_template_migration_link)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_apps_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.29.
|
4
|
+
version: 4.29.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2020-
|
14
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|
@@ -319,8 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: 1.3.6
|
321
321
|
requirements: []
|
322
|
-
|
323
|
-
rubygems_version: 2.6.8
|
322
|
+
rubygems_version: 3.0.6
|
324
323
|
signing_key:
|
325
324
|
specification_version: 4
|
326
325
|
summary: Support to help you develop Zendesk Apps.
|