Invites and suggestions are cases; the responsible follow the content
Test / test (pull_request) Successful in 56s
Test / test (pull_request) Successful in 56s
Five things the first cut of accounts-from-content left open. The first person and the responsible people are set up side by side, and both try again a minute apart: a seed that waited twenty minutes on Kanidm used to hold everyone else up, and a responsible person who failed waited for the next restart. The responsible are gone over again whenever the content changes. watch_for_reload publishes portal.content.reloaded once new content is in place, and seed.rs listens. Being responsible ends when the content stops saying so: someone no page names any more leaves RESPONSIBLE_GROUP in the same pass, if portal is who put them there (Invited.already_member). The account stays. An invite keeps itself current. portal_invites has an expired state; signing in closes a person's invites, a sweep moves the ones whose link ran out, and a desk's move from expired back to open makes a fresh link and mails it. Invites made at start are on file with the desks'. A suggested edit is a case in the built-in portal_edit_suggestions bucket, the person who made it is mailed at each move, and the card lists what they sent and where it stands. Found on the way, against Kanidm 1.11.2: a link's end comes as seconds since the epoch, which portal did not read, so invite mails said "until" and nothing; and a mail search answered with a 5xx was taken for a refusal. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
7a50ce77b2
commit
ef4789f9b2
+20
-1
@@ -36,6 +36,12 @@ pub fn validate_relay_url(relay: &str) -> anyhow::Result<()> {
|
||||
/// runtime's sweeper (`announce.rs`) is what moves the records.
|
||||
pub const EVENTS_BUCKET: &str = "portal_events";
|
||||
|
||||
/// Bucket for changes suggested by the people the content names as
|
||||
/// responsible (`app::suggest_page_edit`): a case like any other, so a
|
||||
/// suggestion is taken up, carried out or turned down by someone at a
|
||||
/// desk, and the person who made it hears which.
|
||||
pub const EDIT_SUGGESTIONS_BUCKET: &str = "portal_edit_suggestions";
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
const BUILTIN_AGGREGATES_YAML: &str = "\
|
||||
aggregates:
|
||||
@@ -53,9 +59,22 @@ aggregates:
|
||||
initial: open
|
||||
states:
|
||||
open: { event: invited }
|
||||
expired: { event: expired }
|
||||
done: { event: done }
|
||||
transitions:
|
||||
open: [done]
|
||||
open: [done, expired]
|
||||
expired: [open, done]
|
||||
- bucket: portal_edit_suggestions
|
||||
attended_by: whoever keeps the content; every suggestion is mailed to the site's inbox too
|
||||
initial: open
|
||||
states:
|
||||
open: { event: suggested }
|
||||
discussed: { event: discussed }
|
||||
done: { event: done }
|
||||
declined: { event: declined }
|
||||
transitions:
|
||||
open: [discussed, done, declined]
|
||||
discussed: [done, declined]
|
||||
";
|
||||
|
||||
/// Adds the runtime's own state graphs to a content repo's. Content
|
||||
|
||||
Reference in New Issue
Block a user