Skip to content

Commit

Permalink
v0.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Sep 2, 2024
1 parent e042f8a commit 3f44ee3
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

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

## [0.1.13] - 2024-09-02

## Added
- Untrusted Sieve script management.

### Changed

### Fixed

## [0.1.12] - 2024-08-29

## Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://stalw.art"
keywords = ["web", "admin", "email", "mail", "server"]
categories = ["email"]
license = "AGPL-3.0-only OR LicenseRef-SEL"
version = "0.1.12"
version = "0.1.13"
edition = "2021"
resolver = "2"

Expand Down
7 changes: 5 additions & 2 deletions src/pages/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,11 @@ impl LayoutBuilder {
.create("Limits")
.route("/sieve-limits/edit")
.insert()
.create("Scripts")
.route("/script")
.create("System Scripts")
.route("/trusted-script")
.insert()
.create("User Scripts")
.route("/untrusted-script")
.insert()
.insert()
.create("Management")
Expand Down
39 changes: 34 additions & 5 deletions src/pages/config/schema/sieve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ impl Builder<Schemas, ()> {
])
.build()
.build()
// Scripts
.new_schema("script")
// Trusted Scripts
.new_schema("trusted-script")
.prefix("sieve.trusted.scripts")
.suffix("contents")
.names("script", "scripts")
Expand All @@ -329,17 +329,46 @@ impl Builder<Schemas, ()> {
.build()
.new_field("contents")
.label("Contents")
.help("Contents of the Sieve script")
.help("Contents of the trusted Sieve script")
.typ(Type::Text)
.input_check([], [Validator::Required])
.build()
.new_form_section()
.title("Sieve Script")
.title("Trusted Sieve Script")
.fields(["_id", "name", "contents"])
.build()
.list_title("Sieve scripts")
.list_title("System Sieve scripts")
.list_subtitle("Manage Sieve scripts executed by the trusted interpreter")
.list_fields(["_id", "name"])
.build()
// Untrusted Scripts
.new_schema("untrusted-script")
.prefix("sieve.untrusted.scripts")
.suffix("contents")
.names("script", "scripts")
.new_id_field()
.label("Script Id")
.help("Unique identifier for the script")
.build()
.new_field("name")
.label("Description")
.help("Brief description of the Sieve script")
.typ(Type::Input)
.input_check([Transformer::Trim], [Validator::Required])
.build()
.new_field("contents")
.label("Contents")
.help("Contents of the Sieve script")
.typ(Type::Text)
.input_check([], [Validator::Required])
.build()
.new_form_section()
.title("Untrusted Sieve Script")
.fields(["_id", "name", "contents"])
.build()
.list_title("User Sieve scripts")
.list_subtitle("Manage untrusted Sieve scripts that can be imported by users")
.list_fields(["_id", "name"])
.build()
}
}

0 comments on commit 3f44ee3

Please sign in to comment.