Skip to content

cli: show feed entitlement on accesspass get/list and held feeds on user get #4112

Description

@martinsander00

Part 4 of #4108.

On an EdgeSeat access pass, entitlement to a multicast group comes from two places: the groups carried by the feeds on the pass, and the groups in mgroup_pub_allowlist / mgroup_sub_allowlist. The CLI only renders the second, so an EdgeSeat pass displays two empty allowlists and reads as granting no multicast access at all, when in fact it may carry several feeds with many groups.

Feed groups are deliberately not mirrored into the allowlist vectors. UpdateFeed replaces feed.groups wholesale, so copying them onto passes would require rewriting every pass referencing that feed; the allowlist path also charges no feed seat, so mirroring would let a user join a purchased group through UpdateMulticastGroupRoles without consuming one. Entitlement stays by reference (accesspass.feed_seats() then feed.groups), and the display is what needs to catch up.

accesspass get / accesspass list

Render feed seats alongside the existing allowlists: the feed, its groups, and the seat's current_users / max_users / window_end / terminates_at. The allowlist rows stay as they are and continue to mean "comped groups, no seat charged".

Touches smartcontract/cli/src/accesspass/get.rs and list.rs.

user get

Show user.feed_pks, the feeds whose seats this user holds. That is the field that answers "why does this feed read 2 of 2 seats consumed", and today it is not rendered anywhere. publishers and subscribers already show actual membership correctly and need no change.

Touches smartcontract/cli/src/user/get.rs.

Testing

  • An EdgeSeat pass with feeds and empty allowlists renders its feeds and their groups rather than appearing to grant nothing
  • A pass with both feeds and comped allowlist entries renders both, distinguishably
  • A non-EdgeSeat pass renders unchanged
  • user get shows the held feeds for a user on an EdgeSeat pass, and omits the section for users that hold none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions