repo collaborator list reports every permission as none #276

Open
opened 2026-09-30 19:20:17 +00:00 by stephen · 0 comments
Owner

fj repo collaborator list shows none in the PERMISSION column for every collaborator, whatever access they actually have.

$ fj repo collaborator add fjord-test --permission read -R rasterstate/fjord-qa-fixtures
✓ Added fjord-test to rasterstate/fjord-qa-fixtures with read permission
$ fj repo collaborator list -R rasterstate/fjord-qa-fixtures
USER        PERMISSION  NAME
fjord-test  none        Test User
$ fj api repos/rasterstate/fjord-qa-fixtures/collaborators/fjord-test/permission | jq -c '{permission, role_name}'
{"permission":"read","role_name":"read"}

Forgejo's GET /repos/{owner}/{repo}/collaborators returns plain user objects, and permissions comes back null. Collaborator.permissions is #[serde(default)], so it deserializes to all false, and permission_level() in src/api/repo_collaborators.rs falls through to "none".

The list endpoint can't answer the question, so the column needs GET /repos/{owner}/{repo}/collaborators/{collaborator}/permission for each row. The alternative is to drop the column, but then list can't confirm what add just did.

`fj repo collaborator list` shows `none` in the PERMISSION column for every collaborator, whatever access they actually have. ``` $ fj repo collaborator add fjord-test --permission read -R rasterstate/fjord-qa-fixtures ✓ Added fjord-test to rasterstate/fjord-qa-fixtures with read permission $ fj repo collaborator list -R rasterstate/fjord-qa-fixtures USER PERMISSION NAME fjord-test none Test User $ fj api repos/rasterstate/fjord-qa-fixtures/collaborators/fjord-test/permission | jq -c '{permission, role_name}' {"permission":"read","role_name":"read"} ``` Forgejo's `GET /repos/{owner}/{repo}/collaborators` returns plain user objects, and `permissions` comes back `null`. `Collaborator.permissions` is `#[serde(default)]`, so it deserializes to all false, and `permission_level()` in `src/api/repo_collaborators.rs` falls through to `"none"`. The list endpoint can't answer the question, so the column needs `GET /repos/{owner}/{repo}/collaborators/{collaborator}/permission` for each row. The alternative is to drop the column, but then `list` can't confirm what `add` just did.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rasterstate/fj#276
No description provided.