Migrate packages and registries graphql to add userPermissions field

The following discussion from !110721 (merged) should be addressed:

  • @mrincon started a discussion:

    Suggestion (non-blocking): Usually we a userPermissions field in our GraphQL API that provides this sort of information, so this type is not consistent with the rest of the UI, could we open a follow up to migrate to this?

    An example: https://docs.gitlab.com/ee/api/graphql/reference/#jobpermissions

    We would then get a chance to rename this to canDelete as well 👍

Proposal

Move the user related permission to a new field userPermissions in the GraphQL queries within packages & registries similar to example above.

Implementation guide

  1. introduce the new fields in the backend.
  2. read those fields from the frontend.
  3. mark the old fields as deprecated.
  4. remove the old fields.

constraints

(3.) needs to happen at least 6 releases before (4.) and (4.) should happen in a major release (from https://docs.gitlab.com/ee/api/graphql/#deprecation-and-removal-process).

Edited Feb 14, 2023 by Rahul Chanila
Assignee Loading
Time tracking Loading