Add base role information to the `memberRoleAbilitiesList` GraphQL query

In the custom role UI, we would like to disable or hide permissions that are not relevant for the chosen base role.

For example:

  • read_code only applies to Guest base role. Other base roles already include this ability.
  • read_vulnerability applies to Guest and Developer, but not for Maintainer or Owner.
  • admin_vulnerability applies to Guest, Developer and Maintainer, but not to Owner.

I propose an additional availableForBaseAccessLevel (or similar name) property in the response of memberRoleAbilitiesList GraphQL query.

The availableForBaseAccessLevel could be either a single number, like 30, which would mean that the permission can be applied to Maintainer and other lower access levels (Guest and Developer). Or the availableForBaseAccessLevel could be an array of access level, [ 10, 20, 30], enumerating specifically all the base roles that can be applied to that permission.

Edited by Eduardo Sanz García