emailengine-app 2.80.0 → 2.81.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.
- package/.dockerignore +44 -0
- package/.github/docker-smoke-test.sh +16 -0
- package/.github/workflows/deploy.yml +4 -0
- package/.github/workflows/release.yaml +4 -0
- package/.github/workflows/test.yml +2 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +56 -0
- package/Dockerfile +17 -9
- package/README.md +6 -0
- package/data/google-crawlers.json +1 -1
- package/docker-compose.yml +7 -1
- package/lib/api-routes/account-routes.js +239 -73
- package/lib/api-routes/blocklist-routes.js +24 -0
- package/lib/api-routes/delivery-test-routes.js +6 -0
- package/lib/api-routes/gateway-routes.js +30 -0
- package/lib/api-routes/license-routes.js +10 -0
- package/lib/api-routes/mcp-oauth-routes.js +3 -3
- package/lib/api-routes/mcp-routes.js +39 -21
- package/lib/api-routes/oauth2-app-routes.js +38 -1
- package/lib/api-routes/outbox-routes.js +6 -0
- package/lib/api-routes/permission-map.js +212 -42
- package/lib/api-routes/pubsub-routes.js +8 -0
- package/lib/api-routes/route-helpers.js +58 -11
- package/lib/api-routes/settings-routes.js +50 -4
- package/lib/api-routes/stats-routes.js +6 -0
- package/lib/api-routes/template-routes.js +21 -0
- package/lib/api-routes/token-routes.js +34 -2
- package/lib/api-routes/webhook-route-routes.js +13 -0
- package/lib/autodetect-imap-settings.js +4 -4
- package/lib/email-client/base-client.js +6 -3
- package/lib/email-client/credential-errors.js +4 -0
- package/lib/email-client/imap/login-failure.js +52 -0
- package/lib/email-client/imap/subconnection.js +2 -1
- package/lib/email-client/imap-client.js +3 -6
- package/lib/enum-descriptions.js +12 -2
- package/lib/imapproxy/imap-server.js +1 -1
- package/lib/mcp/oauth.js +46 -8
- package/lib/mcp/protocol.js +78 -35
- package/lib/mcp/tools.js +53 -17
- package/lib/privileged-settings.js +147 -0
- package/lib/schemas.js +60 -16
- package/lib/sentry.js +13 -2
- package/lib/settings.js +13 -0
- package/lib/tls/catalog.js +428 -0
- package/lib/tls/context.js +87 -161
- package/lib/tls/listeners.js +62 -0
- package/lib/tls/provision.js +1 -1
- package/lib/tls/status.js +128 -79
- package/lib/tls/store.js +3 -2
- package/lib/token-permission-view.js +253 -102
- package/lib/token-permissions.js +176 -26
- package/lib/tokens.js +7 -6
- package/lib/tools.js +5 -3
- package/lib/ui-routes/account-routes.js +195 -61
- package/lib/ui-routes/admin-config-routes.js +41 -21
- package/lib/ui-routes/admin-entities-routes.js +32 -22
- package/lib/ui-routes/mcp-consent-routes.js +72 -31
- package/lib/ui-routes/tls-config-routes.js +121 -74
- package/package.json +16 -16
- package/sbom.json +1 -1
- package/server.js +7 -1
- package/static/css/flyonui.css +1 -1
- package/static/css/public.css +41 -0
- package/static/css/src/app.tailwind.css +135 -4
- package/static/js/public.js +218 -0
- package/static/js/ui.js +89 -36
- package/static/licenses.html +55 -37
- package/translations/README.md +4 -3
- package/translations/de.mo +0 -0
- package/translations/de.po +296 -185
- package/translations/en.po +220 -128
- package/translations/es.mo +0 -0
- package/translations/es.po +558 -0
- package/translations/et.mo +0 -0
- package/translations/et.po +288 -181
- package/translations/fr.mo +0 -0
- package/translations/fr.po +295 -183
- package/translations/it.mo +0 -0
- package/translations/it.po +558 -0
- package/translations/ja.mo +0 -0
- package/translations/ja.po +268 -192
- package/translations/locales.json +24 -0
- package/translations/messages.pot +179 -127
- package/translations/nl.mo +0 -0
- package/translations/nl.po +288 -175
- package/translations/pl.mo +0 -0
- package/translations/pl.po +294 -181
- package/translations/sv.mo +0 -0
- package/translations/sv.po +555 -0
- package/translations/tr.mo +0 -0
- package/translations/tr.po +555 -0
- package/update-info.sh +12 -6
- package/views/account/login-redirect.hbs +6 -5
- package/views/account/passkeys.hbs +8 -8
- package/views/account/security.hbs +2 -2
- package/views/accounts/account.hbs +19 -21
- package/views/accounts/browse.hbs +1 -1
- package/views/accounts/edit.hbs +15 -15
- package/views/accounts/index.hbs +3 -3
- package/views/accounts/register/imap-server.hbs +27 -173
- package/views/accounts/register/validating.hbs +139 -0
- package/views/config/ai.hbs +15 -17
- package/views/config/branding.hbs +7 -7
- package/views/config/document-store/chat.hbs +9 -8
- package/views/config/document-store/index.hbs +14 -15
- package/views/config/document-store/mappings/index.hbs +5 -6
- package/views/config/document-store/mappings/new.hbs +1 -2
- package/views/config/document-store/pre-processing/index.hbs +4 -4
- package/views/config/email-processing.hbs +6 -6
- package/views/config/imap-proxy.hbs +7 -8
- package/views/config/license.hbs +9 -9
- package/views/config/logging.hbs +5 -7
- package/views/config/mcp.hbs +90 -58
- package/views/config/network.hbs +4 -4
- package/views/config/oauth/app.hbs +12 -12
- package/views/config/oauth/index.hbs +6 -6
- package/views/config/oauth/subscriptions.hbs +9 -9
- package/views/config/security.hbs +5 -7
- package/views/config/service.hbs +11 -10
- package/views/config/smtp.hbs +9 -12
- package/views/config/tls-upload.hbs +3 -3
- package/views/config/tls.hbs +281 -182
- package/views/config/webhooks.hbs +12 -15
- package/views/dashboard.hbs +9 -8
- package/views/gateways/edit.hbs +3 -3
- package/views/gateways/gateway.hbs +3 -3
- package/views/gateways/index.hbs +6 -6
- package/views/gateways/new.hbs +3 -3
- package/views/internals/index.hbs +15 -13
- package/views/layout/app.hbs +6 -6
- package/views/layout/login.hbs +32 -19
- package/views/layout/main.hbs +2 -2
- package/views/layout/prompt.hbs +15 -18
- package/views/layout/public.hbs +1 -1
- package/views/mcp/authorize.hbs +47 -45
- package/views/partials/accounts_table.hbs +5 -5
- package/views/partials/ace_assets.hbs +1 -1
- package/views/partials/add_account_modal.hbs +4 -4
- package/views/partials/address_list.hbs +4 -4
- package/views/partials/filter_editor_js.hbs +2 -2
- package/views/partials/gateway_form.hbs +5 -5
- package/views/partials/gateway_js.hbs +1 -1
- package/views/partials/mcp_access_levels.hbs +16 -9
- package/views/partials/mcp_account_limit.hbs +2 -2
- package/views/partials/mcp_tool_count.hbs +15 -14
- package/views/partials/oauth_config_header.hbs +2 -2
- package/views/partials/oauth_form.hbs +37 -42
- package/views/partials/public_alerts.hbs +1 -1
- package/views/partials/public_test_labels.hbs +15 -0
- package/views/partials/public_theme_init.hbs +1 -1
- package/views/partials/security_header.hbs +2 -2
- package/views/partials/template_form.hbs +4 -4
- package/views/partials/theme_init.hbs +1 -1
- package/views/partials/tls_security_card.hbs +4 -1
- package/views/partials/ui/form-field.hbs +6 -1
- package/views/partials/ui/setting-ref.hbs +12 -7
- package/views/partials/ui/stat-card.hbs +4 -1
- package/views/partials/ui/tabs.hbs +3 -7
- package/views/partials/webhook_form.hbs +9 -12
- package/views/partials/webhooks_editor_functions.hbs +1 -1
- package/views/reference/index.hbs +3 -3
- package/views/reference/redirect.hbs +1 -1
- package/views/reference/tag.hbs +1 -1
- package/views/reference/token.hbs +4 -4
- package/views/suppression-lists/index.hbs +8 -6
- package/views/suppression-lists/list.hbs +13 -8
- package/views/templates/edit.hbs +1 -1
- package/views/templates/index.hbs +10 -11
- package/views/templates/template.hbs +5 -5
- package/views/tokens/index.hbs +17 -17
- package/views/tokens/new.hbs +190 -93
- package/views/unsubscribe.hbs +1 -1
- package/views/webhooks/edit.hbs +1 -1
- package/views/webhooks/index.hbs +10 -11
- package/views/webhooks/new.hbs +1 -1
- package/views/webhooks/webhook.hbs +5 -6
- package/workers/api.js +9 -8
- package/workers/smtp.js +1 -1
package/views/mcp/authorize.hbs
CHANGED
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
the one MCP surface a person can reach without passing one of those first, so it is
|
|
26
26
|
also the one where the label would otherwise be missing. --}}
|
|
27
27
|
{{> ui/badge label="Beta" variant="info" soft=true class="badge-sm align-middle"}}</h1>
|
|
28
|
-
<p class="text-base-content/60 mt-2 text-sm">An MCP client is asking for access to
|
|
29
|
-
|
|
28
|
+
<p class="text-base-content/60 mt-2 text-sm">An MCP client is asking for access to this EmailEngine instance. Decide
|
|
29
|
+
what it may manage and which email actions it may perform. After you approve or deny access, you return to
|
|
30
|
+
<code>{{redirectHost}}</code>.</p>
|
|
30
31
|
</div>
|
|
31
32
|
|
|
32
33
|
{{#unless canProvision}}
|
|
@@ -46,40 +47,38 @@
|
|
|
46
47
|
<input type="hidden" name="code_challenge" value="{{values.code_challenge}}" />
|
|
47
48
|
<input type="hidden" name="resource" value="{{values.resource}}" />
|
|
48
49
|
|
|
49
|
-
<div class="space-y-
|
|
50
|
-
|
|
50
|
+
<div class="space-y-5">
|
|
51
|
+
|
|
52
|
+
{{!-- One block per section, in table order: management first, because it is what the
|
|
53
|
+
endpoint is for by default, then mail, declined unless the person or the client's
|
|
54
|
+
scope request said otherwise. The radio group of a section is named after its key,
|
|
55
|
+
which is the field the route reads and what ui.js reads the selection back from.
|
|
56
|
+
Under each group, one grant sentence per level, generated from the table rather than
|
|
57
|
+
written per level: the grant word lists come from the surface tables the enforcement
|
|
58
|
+
reads (never written out here), so this screen cannot promise less than the token
|
|
59
|
+
grants after the tool set changes, and the caveat travels with the level it
|
|
60
|
+
describes. One is visible at a time - the one describing the selected level. --}}
|
|
61
|
+
{{#each mcpSections}}
|
|
51
62
|
<fieldset class="space-y-2">
|
|
52
|
-
<legend class="label-text mb-1">
|
|
53
|
-
{{> mcp_access_levels
|
|
63
|
+
<legend class="label-text mb-1">{{label}}</legend>
|
|
64
|
+
{{> mcp_access_levels section=this name=@key idPrefix=@key selected=(lookup ../selectedLevels @key) includeNone=true}}
|
|
54
65
|
</fieldset>
|
|
55
66
|
|
|
56
|
-
{{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<div data-access="read" class="consent-grant alert alert-soft alert-info text-sm{{#equals accessLevel 'read'}}{{else}} hidden{{/equals}}">
|
|
62
|
-
<span class="icon-[tabler--info-circle] size-5 shrink-0"></span>
|
|
63
|
-
<span>Through the MCP tool set the client will be able to <strong>{{grantWording.read.actions}}</strong>
|
|
64
|
-
{{grantWording.read.groups}} on the accounts its token can reach. It cannot send email, delete anything,
|
|
65
|
-
change anything, read stored credentials, or change instance settings.</span>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div data-access="mail" class="consent-grant alert alert-soft alert-warning text-sm{{#equals accessLevel 'mail'}}{{else}} hidden{{/equals}}">
|
|
69
|
-
<span class="icon-[tabler--alert-triangle] size-5 shrink-0"></span>
|
|
70
|
-
<span>Through the MCP tool set the client will be able to <strong>{{grantWording.mail.actions}}</strong>
|
|
71
|
-
across {{grantWording.mail.groups}} on the accounts its token can reach - everything except the delete
|
|
72
|
-
tool. Instructions inside received mail are a real prompt-injection risk once sending is granted. It
|
|
73
|
-
cannot read stored credentials or change instance settings.</span>
|
|
67
|
+
{{#each levels}}
|
|
68
|
+
<div data-section="{{@../key}}" data-level="{{value}}"
|
|
69
|
+
class="consent-grant alert alert-soft alert-{{variant}} text-sm{{#equals (lookup ../../selectedLevels @../key) value}}{{else}} hidden{{/equals}}">
|
|
70
|
+
<span class="{{#equals variant 'info'}}icon-[tabler--info-circle]{{else}}icon-[tabler--alert-triangle]{{/equals}} size-5 shrink-0"></span>
|
|
71
|
+
<span>{{../lead}} <strong>{{actions}}</strong> across {{groups}}. {{caveat}}</span>
|
|
74
72
|
</div>
|
|
73
|
+
{{/each}}
|
|
74
|
+
{{/each}}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<span
|
|
79
|
-
|
|
80
|
-
mail are a real prompt-injection risk once sending is granted. It cannot read stored credentials or
|
|
81
|
-
change instance settings.</span>
|
|
76
|
+
{{#if errors.access}}
|
|
77
|
+
<div class="alert alert-soft alert-error text-sm">
|
|
78
|
+
<span class="icon-[tabler--alert-circle] size-5 shrink-0"></span>
|
|
79
|
+
<span>{{errors.access}}</span>
|
|
82
80
|
</div>
|
|
81
|
+
{{/if}}
|
|
83
82
|
|
|
84
83
|
<div>
|
|
85
84
|
{{> mcp_account_limit id="account" value=values.account selected=selectedAccount error=errors.account}}
|
|
@@ -88,8 +87,9 @@
|
|
|
88
87
|
{{!-- The grant sentences above say what a level allows in the permission vocabulary; this
|
|
89
88
|
says which tools the client ends up holding, which is closer to the thing being
|
|
90
89
|
approved. Follows the account field too, because limiting the client to one account
|
|
91
|
-
takes the instance-wide tools away from it
|
|
92
|
-
|
|
90
|
+
takes the instance-wide tools away from it - what is left of a management grant is
|
|
91
|
+
then the tools that operate that one account. --}}
|
|
92
|
+
{{> mcp_tool_count id="consentToolCount" autoWire=true levelPrefix="" accountId="account"}}
|
|
93
93
|
|
|
94
94
|
<div class="flex gap-3 pt-2">
|
|
95
95
|
<button type="submit" name="decision" value="deny" class="btn btn-neutral btn-outline grow">
|
|
@@ -108,29 +108,31 @@
|
|
|
108
108
|
TTL, so an approved client holds its token until someone takes it away. Said here
|
|
109
109
|
because this is the screen where the decision is made, and the person making it has
|
|
110
110
|
no other place to learn it. --}}
|
|
111
|
-
<p class="text-base-content/60 text-center text-xs">Approving creates an access token with the
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
<p class="text-base-content/60 text-center text-xs">Approving creates an access token with the MCP scopes you
|
|
112
|
+
chose (<code>mcp-manage</code> for the instance, <code>mcp</code> for mail) and exactly the grants shown
|
|
113
|
+
above. It does not expire - it appears on the <a href="/admin/tokens?scope=mcp-manage&scope=mcp"
|
|
114
|
+
class="link">Access Tokens</a> page and stays valid until you revoke it there.</p>
|
|
114
115
|
|
|
115
116
|
</div>
|
|
116
117
|
</form>
|
|
117
118
|
|
|
118
|
-
<script nonce="{{cspNonce}}">
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
120
|
+
// The grant sentences describe the same token under each setting of the radios, so whichever
|
|
121
|
+
// are showing are the ones the operator is about to approve. The tool count is wired by ui.js
|
|
122
|
+
// off the count element's data attributes; this only follows the alerts. On DOMContentLoaded
|
|
123
|
+
// because the prompt layout loads ui.js after the page body, and the helper lives there.
|
|
124
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
125
|
+
let sections = JSON.parse(document.getElementById('consentToolCount').dataset.mcpSections || '{}');
|
|
123
126
|
let grants = Array.from(document.querySelectorAll('.consent-grant'));
|
|
124
127
|
|
|
125
128
|
let sync = () => {
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
grants.forEach(grant => grant.classList.toggle('hidden', grant.dataset.access !== access));
|
|
129
|
+
let choice = uiMcpLevelChoice(sections, '');
|
|
130
|
+
grants.forEach(grant => grant.classList.toggle('hidden', grant.dataset.level !== choice[grant.dataset.section]));
|
|
129
131
|
};
|
|
130
132
|
|
|
131
|
-
|
|
133
|
+
document.querySelectorAll('input[type="radio"]').forEach(radio => radio.addEventListener('change', sync));
|
|
132
134
|
sync();
|
|
133
|
-
})
|
|
135
|
+
});
|
|
134
136
|
</script>
|
|
135
137
|
|
|
136
138
|
{{/if}}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<div class="card bg-base-100 shadow-md mb-6">
|
|
13
13
|
|
|
14
14
|
<div class="overflow-x-auto">
|
|
15
|
-
<table class="table">
|
|
15
|
+
<table class="table ee-table-stack">
|
|
16
16
|
<thead>
|
|
17
17
|
<tr>
|
|
18
18
|
<th>Name</th>
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
<div><strong>{{name}}</strong></div>
|
|
34
34
|
{{> ui/entity-id id=account label="Account ID"}}
|
|
35
35
|
</td>
|
|
36
|
-
<td class="relative">
|
|
36
|
+
<td class="relative" data-label="Email">
|
|
37
37
|
{{> ui/row-link href=(concat "/admin/accounts/" (urlpart account))}}{{email}}
|
|
38
38
|
</td>
|
|
39
39
|
|
|
40
|
-
<td class="relative">
|
|
40
|
+
<td class="relative" data-label="Type">
|
|
41
41
|
{{> ui/row-link href=(concat "/admin/accounts/" (urlpart account))}}
|
|
42
42
|
{{#if type.icon}}
|
|
43
43
|
{{!-- relative z-[1] lifts the tooltip trigger above the row link --}}
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
{{/if}}
|
|
53
53
|
</td>
|
|
54
54
|
|
|
55
|
-
<td class="relative w-32">
|
|
55
|
+
<td class="relative w-32" data-label="Status">
|
|
56
56
|
{{> ui/row-link href=(concat "/admin/accounts/" (urlpart account))}}
|
|
57
57
|
{{!-- live state badge: app.js updates the badge-{type} class,
|
|
58
58
|
text and error tooltip through the /admin/changes SSE
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{{!-- ../showActions: inside {{#each}} the bare name would resolve against the
|
|
68
68
|
row, not the partial params, so the cell silently vanished (phantom column) --}}
|
|
69
69
|
{{#if ../showActions}}
|
|
70
|
-
<td class="relative text-end">
|
|
70
|
+
<td class="ee-stack-actions relative text-end">
|
|
71
71
|
{{> ui/row-actions openHref=(concat "/admin/accounts/" (urlpart account)) label="Account actions"
|
|
72
72
|
deleteModal="#deleteAccount" deleteName=(when name name email) deleteAction=(concat "/admin/accounts/" (urlpart account) "/delete")}}
|
|
73
73
|
</td>
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
<link rel="stylesheet" href="/static/js/ace/css/theme/kuroir.css">
|
|
11
11
|
<link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night.css">
|
|
12
12
|
<link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night_eighties.css">
|
|
13
|
-
<script src="/static/js/ace/ace.js"></script>
|
|
13
|
+
<script data-cfasync="false" src="/static/js/ace/ace.js"></script>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<form method="post" action="/admin/accounts/new">
|
|
3
3
|
<input type="hidden" name="crumb" value="{{crumb}}">
|
|
4
4
|
<div class="modal-body space-y-4">
|
|
5
|
-
{{> ui/form-field id="account-name" name="name" label="Full name
|
|
6
|
-
{{> ui/form-field id="account-id" name="account" label="Account
|
|
5
|
+
{{> ui/form-field id="account-name" name="name" label="Full name" placeholder="e.g., John Smith"}}
|
|
6
|
+
{{> ui/form-field id="account-id" name="account" label="Account ID (optional)" placeholder="e.g., account_123" hint="Leave blank to generate an ID. Using an existing ID updates that account."}}
|
|
7
7
|
|
|
8
|
-
<p class="text-sm text-base-content/60">
|
|
8
|
+
<p class="text-sm text-base-content/60">Next, connect the email account through the hosted authentication form. You can also <a
|
|
9
9
|
href="https://learn.emailengine.app/docs/accounts/hosted-authentication" target="_blank" rel="noopener noreferrer"
|
|
10
10
|
referrerpolicy="no-referrer" class="link link-animated">use this form in your own app</a>.
|
|
11
11
|
</p>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</form>
|
|
18
18
|
{{/ui/modal}}
|
|
19
19
|
|
|
20
|
-
<script nonce="{{cspNonce}}">
|
|
20
|
+
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
21
21
|
document.addEventListener('DOMContentLoaded', () => {
|
|
22
22
|
let modalElm = document.getElementById('addAccount');
|
|
23
23
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<input type="checkbox" class="checkbox checkbox-sm checkbox-entry" data-ip="{{localAddress}}"
|
|
9
9
|
name="localAddresses" value="{{localAddress}}" {{#if checked}}checked{{/if}}>
|
|
10
10
|
</td>
|
|
11
|
-
<td>{{localAddress}}
|
|
11
|
+
<td data-label="Local IP">{{localAddress}}
|
|
12
12
|
|
|
13
13
|
{{#if notice}}<span class="tooltip [--placement:top] inline-flex align-middle"><span
|
|
14
14
|
class="tooltip-toggle cursor-default"><span
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
{{#if defaultInterface}}<span class="badge badge-soft">default</span>{{/if}}
|
|
20
20
|
</div>
|
|
21
21
|
</td>
|
|
22
|
-
<td>{{ip}}</td>
|
|
23
|
-
<td>
|
|
22
|
+
<td data-label="Public IP">{{ip}}</td>
|
|
23
|
+
<td data-label="Hostname">
|
|
24
24
|
{{name}}
|
|
25
25
|
</td>
|
|
26
|
-
<td class="text-end">
|
|
26
|
+
<td class="ee-stack-actions text-end">
|
|
27
27
|
<button type="button" class="btn btn-error btn-soft btn-circle btn-sm address-action-delete"
|
|
28
28
|
data-address="{{localAddress}}" aria-label="Delete this address" title="Delete this address">
|
|
29
29
|
<span class="icon-[tabler--trash] size-4"></span>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
notificationTypesJson, which switches on the event-name autocompleter.
|
|
23
23
|
--}}
|
|
24
24
|
{{> ace_assets}}
|
|
25
|
-
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
25
|
+
<script data-cfasync="false" src="/static/js/ace/ext-language_tools.js"></script>
|
|
26
26
|
|
|
27
27
|
{{#if notificationTypesJson}}
|
|
28
28
|
<input type="hidden" id="notificationTypesJson" value="{{notificationTypesJson}}">
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
{{/ui/modal}}
|
|
52
52
|
|
|
53
|
-
<script nonce="{{cspNonce}}">
|
|
53
|
+
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
54
54
|
document.addEventListener('DOMContentLoaded', () => {
|
|
55
55
|
|
|
56
56
|
let scriptEnv = JSON.parse(document.getElementById('scriptEnvJson').value);
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
basicAutoComplete class hook) --}}
|
|
4
4
|
<div class="space-y-4">
|
|
5
5
|
|
|
6
|
-
{{> ui/form-field id="name" label="Display Name" value=values.name error=errors.name placeholder="SendGrid Transactional" lpignore=true required=true class="basicAutoComplete" hint="
|
|
6
|
+
{{> ui/form-field id="name" label="Display Name" value=values.name error=errors.name placeholder="SendGrid Transactional" lpignore=true required=true class="basicAutoComplete" hint="Name shown for this gateway in EmailEngine."}}
|
|
7
7
|
|
|
8
|
-
{{> ui/form-field id="user" label="Username" value=values.user error=errors.user lpignore=true hint="SMTP
|
|
8
|
+
{{> ui/form-field id="user" label="Username" value=values.user error=errors.user lpignore=true hint="Username required by your SMTP provider, if any."}}
|
|
9
9
|
|
|
10
|
-
{{> ui/form-field id="pass" type="password" label="Password" value=values.pass error=errors.pass lpignore=true placeholder=(when hasSMTPPass "Password saved
|
|
10
|
+
{{> ui/form-field id="pass" type="password" label="Password" value=values.pass error=errors.pass lpignore=true placeholder=(when hasSMTPPass "Password saved") hint=(concat "Password required by your SMTP provider." (when gatewayData " Leave blank to keep the current password."))}}
|
|
11
11
|
|
|
12
12
|
{{> ui/form-field id="host" label="Server Address" value=values.host error=errors.host lpignore=true placeholder="smtp.sendgrid.net" required=true hint="SMTP server hostname or IP address"}}
|
|
13
13
|
|
|
14
|
-
{{> ui/form-field id="port" type="number" label="Port" value=values.port error=errors.port lpignore=true placeholder="587" required=true hint="Common ports: 25
|
|
14
|
+
{{> ui/form-field id="port" type="number" label="Port" value=values.port error=errors.port lpignore=true placeholder="587" required=true hint="Common ports: 25 or 587 for STARTTLS, 465 for direct TLS."}}
|
|
15
15
|
|
|
16
|
-
{{> ui/checkbox id="secure" label="Use direct TLS" checked=values.secure error=errors.secure tooltip="
|
|
16
|
+
{{> ui/checkbox id="secure" label="Use direct TLS" checked=values.secure error=errors.secure tooltip="Usually enabled for port 465. When disabled, EmailEngine uses STARTTLS if the server supports it."}}
|
|
17
17
|
|
|
18
18
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<input type="hidden" id="wellKnownServices" value="{{wellKnownServices}}">
|
|
2
|
-
<script nonce="{{cspNonce}}">
|
|
2
|
+
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
3
3
|
document.addEventListener('DOMContentLoaded', () => {
|
|
4
4
|
let wellKnownServices = JSON.parse(document.getElementById('wellKnownServices').value);
|
|
5
5
|
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
{{!--
|
|
2
|
-
The
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
The radio group of one MCP access section (instance management or email access), rendered
|
|
3
|
+
identically by the OAuth consent prompt, the MCP config page's generator and the token form
|
|
4
|
+
so the three cannot drift on what each level promises. The options come from MCP_SECTIONS
|
|
5
|
+
(lib/token-permission-view.js), which also carries the pair list each level mints.
|
|
6
6
|
Params:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
section - the section object from MCP_SECTIONS (required)
|
|
8
|
+
name - input name shared by the radio group (required; the pages name it
|
|
9
|
+
<prefix><section key>, which is what static/js/ui.js reads back)
|
|
10
|
+
idPrefix - per-page prefix for the input ids; ids are <idPrefix>_<level> (required)
|
|
11
|
+
selected - the selected level (required)
|
|
12
|
+
includeNone - true to offer the section's decline option first (the consent prompt and the
|
|
13
|
+
generator; the token form declines a section by leaving its scope unticked)
|
|
10
14
|
--}}
|
|
11
|
-
{{#
|
|
12
|
-
{{> ui/radio id=(concat
|
|
15
|
+
{{#if includeNone}}
|
|
16
|
+
{{> ui/radio id=(concat idPrefix "_none") name=name value="none" label=section.none.label selected=selected hint=section.none.hint}}
|
|
17
|
+
{{/if}}
|
|
18
|
+
{{#each section.levels}}
|
|
19
|
+
{{> ui/radio id=(concat ../idPrefix "_" value) name=../name value=value label=label selected=../selected hint=hint}}
|
|
13
20
|
{{/each}}
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
error - validation error message (optional)
|
|
11
11
|
--}}
|
|
12
12
|
{{> ui/account-picker id=id value=value selected=selected error=error label="Limit to one account"
|
|
13
|
-
placeholder="Search by name, address or account
|
|
14
|
-
hint="
|
|
13
|
+
placeholder="Search by name, email address, or account ID"
|
|
14
|
+
hint="Limit access to this account and exclude instance-wide tools. Leave blank to allow all accounts and instance tools within the selected access levels."}}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{{!--
|
|
2
|
-
The "N of M MCP tools available" line, shown by every page that mints an
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
test/mcp-tools-test.js. Reads mcpTools (and
|
|
6
|
-
|
|
2
|
+
The "N of M MCP tools available" line, shown by every page that mints an MCP token so the
|
|
3
|
+
three cannot disagree about what a credential will actually be offered. The counting rule is
|
|
4
|
+
uiMcpToolCount() in static/js/ui.js - the browser's copy of toolVisibleTo(), pinned to it by
|
|
5
|
+
test/mcp-tools-test.js. Reads mcpTools (and mcpSections, when auto-wired) from the page
|
|
6
|
+
context.
|
|
7
7
|
|
|
8
|
-
Pass
|
|
9
|
-
generator and the consent prompt); leave it out
|
|
10
|
-
which is what the access-token form does
|
|
8
|
+
Pass levelPrefix to have ui.js drive the count from the section radio groups named
|
|
9
|
+
<levelPrefix><section key> (the MCP config generator and the consent prompt); leave it out
|
|
10
|
+
and the page repaints the element itself, which is what the access-token form does.
|
|
11
11
|
Params:
|
|
12
|
-
id
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
id - element id (required; the page's own script needs it, and so does nothing else)
|
|
13
|
+
autoWire - true to let ui.js drive the count (optional)
|
|
14
|
+
levelPrefix - the radio group name prefix, with autoWire; may be empty (optional)
|
|
15
|
+
accountId - id of the "limit to one account" field to follow, with autoWire (optional)
|
|
16
|
+
class - extra classes on the wrapper (optional)
|
|
16
17
|
--}}
|
|
17
18
|
<div id="{{id}}" class="text-sm space-y-1{{#if class}} {{class}}{{/if}}" data-mcp-tools="{{json mcpTools}}"
|
|
18
|
-
{{#if
|
|
19
|
-
data-mcp-
|
|
19
|
+
{{#if autoWire}}data-mcp-auto-wire="1" data-mcp-level-prefix="{{levelPrefix}}" data-mcp-account-id="{{accountId}}"
|
|
20
|
+
data-mcp-sections="{{json mcpSections}}"{{/if}}></div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
actions in the header row (same idiom as ui/page-header). Pass badgeLabel
|
|
3
3
|
to show a count badge after the title (e.g. the apps total). --}}
|
|
4
4
|
{{#if @partial-block}}
|
|
5
|
-
{{#> ui/page-header title="OAuth2 Apps" icon="icon-[tabler--brand-oauth]" subtitle="
|
|
5
|
+
{{#> ui/page-header title="OAuth2 Apps" icon="icon-[tabler--brand-oauth]" subtitle="Configure provider credentials for connecting Gmail, Outlook, and other email accounts." badgeLabel=badgeLabel badgeVariant="neutral" class="mb-6"}}{{> @partial-block}}{{/ui/page-header}}
|
|
6
6
|
{{else}}
|
|
7
|
-
{{> ui/page-header title="OAuth2 Apps" icon="icon-[tabler--brand-oauth]" subtitle="
|
|
7
|
+
{{> ui/page-header title="OAuth2 Apps" icon="icon-[tabler--brand-oauth]" subtitle="Configure provider credentials for connecting Gmail, Outlook, and other email accounts." badgeLabel=badgeLabel badgeVariant="neutral" class="mb-6"}}
|
|
8
8
|
{{/if}}
|