first pass at access control setup
This commit is contained in:
@@ -90,7 +90,7 @@ struct Action {
|
||||
action_ref: String,
|
||||
pack_ref: String,
|
||||
label: String,
|
||||
description: String,
|
||||
description: Option<String>,
|
||||
entrypoint: String,
|
||||
runtime: Option<i64>,
|
||||
created: String,
|
||||
@@ -105,7 +105,7 @@ struct ActionDetail {
|
||||
pack: i64,
|
||||
pack_ref: String,
|
||||
label: String,
|
||||
description: String,
|
||||
description: Option<String>,
|
||||
entrypoint: String,
|
||||
runtime: Option<i64>,
|
||||
param_schema: Option<serde_json::Value>,
|
||||
@@ -253,7 +253,7 @@ async fn handle_list(
|
||||
.runtime
|
||||
.map(|r| r.to_string())
|
||||
.unwrap_or_else(|| "none".to_string()),
|
||||
output::truncate(&action.description, 40),
|
||||
output::truncate(&action.description.unwrap_or_default(), 40),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -288,7 +288,10 @@ async fn handle_show(
|
||||
("Reference", action.action_ref.clone()),
|
||||
("Pack", action.pack_ref.clone()),
|
||||
("Label", action.label.clone()),
|
||||
("Description", action.description.clone()),
|
||||
(
|
||||
"Description",
|
||||
action.description.unwrap_or_else(|| "None".to_string()),
|
||||
),
|
||||
("Entry Point", action.entrypoint.clone()),
|
||||
(
|
||||
"Runtime",
|
||||
@@ -356,7 +359,10 @@ async fn handle_update(
|
||||
("Ref", action.action_ref.clone()),
|
||||
("Pack", action.pack_ref.clone()),
|
||||
("Label", action.label.clone()),
|
||||
("Description", action.description.clone()),
|
||||
(
|
||||
"Description",
|
||||
action.description.unwrap_or_else(|| "None".to_string()),
|
||||
),
|
||||
("Entrypoint", action.entrypoint.clone()),
|
||||
(
|
||||
"Runtime",
|
||||
|
||||
@@ -112,7 +112,7 @@ struct Rule {
|
||||
pack: Option<i64>,
|
||||
pack_ref: String,
|
||||
label: String,
|
||||
description: String,
|
||||
description: Option<String>,
|
||||
#[serde(default)]
|
||||
trigger: Option<i64>,
|
||||
trigger_ref: String,
|
||||
@@ -133,7 +133,7 @@ struct RuleDetail {
|
||||
pack: Option<i64>,
|
||||
pack_ref: String,
|
||||
label: String,
|
||||
description: String,
|
||||
description: Option<String>,
|
||||
#[serde(default)]
|
||||
trigger: Option<i64>,
|
||||
trigger_ref: String,
|
||||
@@ -321,7 +321,10 @@ async fn handle_show(
|
||||
("Ref", rule.rule_ref.clone()),
|
||||
("Pack", rule.pack_ref.clone()),
|
||||
("Label", rule.label.clone()),
|
||||
("Description", rule.description.clone()),
|
||||
(
|
||||
"Description",
|
||||
rule.description.unwrap_or_else(|| "None".to_string()),
|
||||
),
|
||||
("Trigger", rule.trigger_ref.clone()),
|
||||
("Action", rule.action_ref.clone()),
|
||||
("Enabled", output::format_bool(rule.enabled)),
|
||||
@@ -440,7 +443,10 @@ async fn handle_update(
|
||||
("Ref", rule.rule_ref.clone()),
|
||||
("Pack", rule.pack_ref.clone()),
|
||||
("Label", rule.label.clone()),
|
||||
("Description", rule.description.clone()),
|
||||
(
|
||||
"Description",
|
||||
rule.description.unwrap_or_else(|| "None".to_string()),
|
||||
),
|
||||
("Trigger", rule.trigger_ref.clone()),
|
||||
("Action", rule.action_ref.clone()),
|
||||
("Enabled", output::format_bool(rule.enabled)),
|
||||
|
||||
Reference in New Issue
Block a user