Skip to content
Snippets Groups Projects

Draft: Add email address to user state struct

Open Jelle van der Waa requested to merge mailman-integration into main
1 unresolved thread

The mailman integration requires an email address to be available to check if an Arch staff is a member of a mailing list.

Current plan:

Only implement the functionality for the @archlinux.org email addresses leave the other addresses alone for now, so:

  • Add arch_email field to Keycloak
  • Implement gluebuddy subscribing
  • Write wiki instructions about how to manage your subscription (so turn off delivery of @archlinux.org email) to Staff Services
  • At a later time consider adding a mailinglist field which can use a personal email address as the main keycloak email address can be changed by users themself.
Edited by Jelle van der Waa

Merge request reports

Pipeline #87948 failed

Pipeline failed for a5031d94 on mailman-integration

Approval is optional
Merge blocked: 4 checks failed

Merge details

  • The source branch is 23 commits behind the target branch.
  • 7 commits will be added to main.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jelle van der Waa requested review from @anthraxx

    requested review from @anthraxx

  • Can be locally ran with:

    ssh -L 8001:localhost:8001 root@lists.archlinux.org

    And then cargo run plan. This still requires keycloak to have the correct email addresses as not all staff use @archlinux.org for their account....

    Mailman Staff mailing list 'staff.lists.archlinux.org' group members has changed!
    Plan: 46 to add, 0 to change, 0 to destroy.
    ------------------------------------------------------------------------
    Mailman Staff mailing list 'arch-dev-public.lists.archlinux.org' group members has changed!
    Plan: 54 to add, 0 to change, 0 to destroy.
    ------------------------------------------------------------------------
  • Jelle van der Waa added 45 commits

    added 45 commits

    • dd009f0f...08254791 - 38 commits from branch main
    • c581673d - README.md: fix typo protocol
    • 99f53cd0 - Add email address to user state struct
    • ba8adf89 - Make it run a bit faster by commenting out Gitlab checks
    • ba882690 - Document mailman env variables
    • 4dd45024 - WIP: implement membership checks
    • 7edd7175 - keycloak: fetch arch_email attribute
    • a5031d94 - WIP: subscription/apply mailman

    Compare with previous version

86 })
87 }
88
89 pub fn membership_url(&self, user: &User) -> String {
90 format!(
91 "{}/3.1/addresses/{}/memberships",
92 &self.url, user.arch_email
93 )
94 }
95
96 pub async fn gather(&self) -> Result<()> {
97 info!("Gathering Mailman state");
98 // http://localhost:8001/3.1/addresses/jelle@archlinux.org/memberships | jq -r '.entries[].list_id'
99 let mut state = self.state.lock().await;
100
101 for user in &mut state.users.values_mut() {
  • This should gather loop over all mailing lists and gather all members, get the required members for the group from Keycloak and then check if all is good (tm).

  • Please register or sign in to reply
  • Jelle van der Waa changed the description

    changed the description

  • Please register or sign in to reply
    Loading