Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to view status or cancel outstanding owner invitations #2868

Open
Nemo157 opened this issue Oct 4, 2020 · 4 comments
Open

No way to view status or cancel outstanding owner invitations #2868

Nemo157 opened this issue Oct 4, 2020 · 4 comments
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@Nemo157
Copy link
Member

Nemo157 commented Oct 4, 2020

After inviting someone to be an owner of a crate there is no way to see the status of this invitation, other than remembering you sent the invitation and querying owners to see whether they have accepted it. Also, until the invitation is accepted there is no way to cancel/revoke the permission, so if at some point after sending you realise the invited user is untrustworthy, there is no way to stop them from accepting the invite and removing your ownership permission.

@Shnatsel
Copy link
Member

Shnatsel commented Oct 4, 2020

Related: invitations never expire (#2869)

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works and removed C-feature-request labels Feb 11, 2021
bors added a commit that referenced this issue Jun 16, 2021
mirage: Implement `crate_owner_invitations` endpoints

This should simplify implementing #2868 in the future :)
@pietroalbini
Copy link
Member

Opened #3763 to provide the required data to the frontend. Once that's merged, the frontend needs to display the data and the backend needs to authorize crate owners to decline invitations on their crate.

Note that to prevent abuse the endpoint doesn't publicly expose invitations. An invitation is going to be accessible through the API only if you're authenticated and you're the invited person or an owner of the affected crate.

@Shnatsel
Copy link
Member

A one use case such privacy prevents is detailed listing of all owners by cargo supply-chain, but this is probably a reasonable trade-off.

@cuviper
Copy link
Member

cuviper commented Jul 1, 2021

When it comes to supply-chain, you also don't know who the current owners may invite tomorrow. I think a pending invitation is not so different, just a step closer, as the invited person is not an owner yet.

bors added a commit that referenced this issue Aug 18, 2021
…bo87

Add the `/api/private/crate-owner-invitations` endpoint

The endpoint provides a listing of all the invitations sent to the current user or all the invitations to a crate the user owns. Unauthenticated users or unrelated users won't be able to see others' invitations to prevent abuses.

The two ways to query the endpoint are:

    GET /api/private/crate-owner-invitations?crate_name={name}
    GET /api/private/crate-owner-invitations?invitee_id={uid}

The endpoint is paginated using only seek-based pagination, and the next page field is provided when more results are available.

Once the frontend switches to use the new endpoint we can remove safely remove the old "v1" endpoint, as that's only used for the frontend. Because of this, the "v1" endpoint internally uses the same logic as the new one and converts the data to the old schema.

Part of #2868
r? `@Turbo87`
bors added a commit that referenced this issue Aug 18, 2021
…bo87

Add the `/api/private/crate-owner-invitations` endpoint

The endpoint provides a listing of all the invitations sent to the current user or all the invitations to a crate the user owns. Unauthenticated users or unrelated users won't be able to see others' invitations to prevent abuses.

The two ways to query the endpoint are:

    GET /api/private/crate-owner-invitations?crate_name={name}
    GET /api/private/crate-owner-invitations?invitee_id={uid}

The endpoint is paginated using only seek-based pagination, and the next page field is provided when more results are available.

Once the frontend switches to use the new endpoint we can remove safely remove the old "v1" endpoint, as that's only used for the frontend. Because of this, the "v1" endpoint internally uses the same logic as the new one and converts the data to the old schema.

Part of #2868
r? `@Turbo87`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

5 participants