Skip to content

Commit 3f44ee3

Browse files
committed
v0.1.13
1 parent e042f8a commit 3f44ee3

File tree

5 files changed

+50
-9
lines changed

5 files changed

+50
-9
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.1.13] - 2024-09-02
6+
7+
## Added
8+
- Untrusted Sieve script management.
9+
10+
### Changed
11+
12+
### Fixed
13+
514
## [0.1.12] - 2024-08-29
615

716
## Added

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ homepage = "https://stalw.art"
77
keywords = ["web", "admin", "email", "mail", "server"]
88
categories = ["email"]
99
license = "AGPL-3.0-only OR LicenseRef-SEL"
10-
version = "0.1.12"
10+
version = "0.1.13"
1111
edition = "2021"
1212
resolver = "2"
1313

src/pages/config/mod.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,11 @@ impl LayoutBuilder {
539539
.create("Limits")
540540
.route("/sieve-limits/edit")
541541
.insert()
542-
.create("Scripts")
543-
.route("/script")
542+
.create("System Scripts")
543+
.route("/trusted-script")
544+
.insert()
545+
.create("User Scripts")
546+
.route("/untrusted-script")
544547
.insert()
545548
.insert()
546549
.create("Management")

src/pages/config/schema/sieve.rs

+34-5
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ impl Builder<Schemas, ()> {
312312
])
313313
.build()
314314
.build()
315-
// Scripts
316-
.new_schema("script")
315+
// Trusted Scripts
316+
.new_schema("trusted-script")
317317
.prefix("sieve.trusted.scripts")
318318
.suffix("contents")
319319
.names("script", "scripts")
@@ -329,17 +329,46 @@ impl Builder<Schemas, ()> {
329329
.build()
330330
.new_field("contents")
331331
.label("Contents")
332-
.help("Contents of the Sieve script")
332+
.help("Contents of the trusted Sieve script")
333333
.typ(Type::Text)
334334
.input_check([], [Validator::Required])
335335
.build()
336336
.new_form_section()
337-
.title("Sieve Script")
337+
.title("Trusted Sieve Script")
338338
.fields(["_id", "name", "contents"])
339339
.build()
340-
.list_title("Sieve scripts")
340+
.list_title("System Sieve scripts")
341341
.list_subtitle("Manage Sieve scripts executed by the trusted interpreter")
342342
.list_fields(["_id", "name"])
343343
.build()
344+
// Untrusted Scripts
345+
.new_schema("untrusted-script")
346+
.prefix("sieve.untrusted.scripts")
347+
.suffix("contents")
348+
.names("script", "scripts")
349+
.new_id_field()
350+
.label("Script Id")
351+
.help("Unique identifier for the script")
352+
.build()
353+
.new_field("name")
354+
.label("Description")
355+
.help("Brief description of the Sieve script")
356+
.typ(Type::Input)
357+
.input_check([Transformer::Trim], [Validator::Required])
358+
.build()
359+
.new_field("contents")
360+
.label("Contents")
361+
.help("Contents of the Sieve script")
362+
.typ(Type::Text)
363+
.input_check([], [Validator::Required])
364+
.build()
365+
.new_form_section()
366+
.title("Untrusted Sieve Script")
367+
.fields(["_id", "name", "contents"])
368+
.build()
369+
.list_title("User Sieve scripts")
370+
.list_subtitle("Manage untrusted Sieve scripts that can be imported by users")
371+
.list_fields(["_id", "name"])
372+
.build()
344373
}
345374
}

0 commit comments

Comments
 (0)