Add readEnvironment field to GraphQL API
What does this MR do and why?
Adds the readEnvironment
field to the GraphQL API (under project permissions).
This will enable FE to check if the current user has permissions to read the environments and hide related features accordingly.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Go to GraphiQL explorer
http://gdk.test:3000/-/graphql-explorer
- Run the following query:
query CanReadEnvironment {
project(fullPath: <project-path>) {
__typename
id
userPermissions {
readEnvironment
}
}
}
- Check that the result shows the
readEnvironment
value astrue
orfalse
as applicable.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #381095 (closed)
Edited by Leaminn Ma