~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

lexicons: authFull grants the group pool, basePermissions retired

Open
Open chadtmiller.com wants to merge into main from grain.social/grain:authfull-group-pool

What changes

social.grain.authFull grants the group pool. A new space permission: create, update and delete of the pool's collections (galleries, items, photos, exifs, favorites, comments) in social.grain.group.pool spaces of any authority, the groups an account is in. Its detail now says "on Grain and in your groups". next/'s copy matches.

social.grain.basePermissions is retired. It was a set of the pool's space alone (titled "Photos") that nothing asked for. It's deleted here and in next/, and named in RETIRED in harness/lexicons.mjs with why. publish-lexicons deletes its published record once this is on main.

Why

Signing in to next.grain.social lists "Pool spaces you're in: Add, change and remove your own galleries, items, photos and exifs" as its own entry beside "Grain". HUD asks for the views' pool write as a raw space: token because its rule is that an app's permission set never holds a space. Putting the pool in Grain's set means a sign-in shows Grain once, and the set grows with the pool as it does with everything else, with no new consent.

The raw token goes away only once HUD lets an app's set hold the spaces of its namespace, which is being changed in HUD (branch app-set-spaces). This has to be published first. HUD checks at startup that a set grants what it holds, and the account's PDS reads the published set, not this copy. Until Grain takes that HUD, the sign-in asks for both, the set and the raw token, which is no worse than now.

org.atgrp calls to the group host (leaving a group) stay outside the set: a set names only its own namespace's methods.

How it was checked

node harness/lexicons.mjs passes ("only grown since" main, with basePermissions retired). node next/check-apps.mjs passes, and next/lexicons/social/grain matches lexicons/social/grain. The rest is left to the checks.

Shortcomings

The permission set's space entry wasn't tried against a PDS's consent screen here. The reference PDS and zds read space permissions in sets (field guide §9.5). A PDS serving no spaces skips that permission and grants the rest.

Review

This conflicts with lexicons: retire social.grain.privateGallery in RETIRED (two adjacent entries). Whichever lands second takes both.

Approved an earlier version

This adds a space permission to social.grain.authFull. It covers create, update and delete of the pool's six collections in social.grain.group.pool spaces of any authority. It retires social.grain.basePermissions, deleting it from lexicons/ and next/ and naming it in RETIRED. The next/ copy of authFull matches lexicons/, and nothing else in the repository references basePermissions, so the deletion is safe.

I found nothing that must change. I didn't run the checks.

Two things to confirm, neither blocking:

  • The new entry leaves out skey, while the retired set had "skey": "*". The org.atgrp sets in next/lexicons always set it. If a PDS or HUD reads a missing skey as "any" you're fine. If one reads it as "none" or self, the grant would silently narrow. The PR says the entry wasn't tried against a PDS's consent screen, so it's worth checking on the reference PDS and zds. Adding "skey": "*" would remove the doubt.
  • The set no longer includes read, which basePermissions had. That fits "create, update and delete" and the new detail text. If a client relied on that set to read pools, it still needs the raw space: token.
Approved

The change since my approval only touches next/check-apps.mjs. The checker now tells repo writes apart from space writes (w.space.type). For each space write in the views, it requires the named permission set to hold a space permission with authority *, create, update and delete, the matching spaceType, and the collection. That fits the new authFull entry and keeps the set and the views from drifting apart. I found nothing that must change.

Two small notes, neither blocking:

  • needed(type) is applied to a space type, where it was written for collections. That works if it only tests the namespace, which the social.grain.group.pool type satisfies.
  • My earlier question about skey is still open. I didn't see it answered in this diff.

I didn't run the checks.

On skey: left out on purpose. The spaces spec defaults a missing skey to * (the field guide's Table 9.1, from the spec). HUD's own place.hud.authFull writes its three space permissions the same way, with no skey, and HUD's e2e-spaces passes on the reference PDS's spaces alpha with spaces of those types keyed by TIDs (private copies of apps), so the alpha reads a missing skey as any. The org.atgrp sets write "skey": "self" because they mean only self. The pool is keyed self, which * covers either way.

On read: no Grain client reads a pool through a member's session. grain-serve reads pools through the group's session at its host, so the set grants only what the views write.