dataall icon indicating copy to clipboard operation
dataall copied to clipboard

List and search for possible values when inviting a team within an environment

Open louishourcade opened this issue 2 years ago • 4 comments

Is your idea related to a problem? Please describe. In the current version, when you want to invite a team in an environment, data.all only lists the teams you are part of (as a data.all user). If I want to invite a team that my user is not part of, I need to provide it's name (free text). This is error prone as users can make a typo when providing the name, which will lead to problems down the road when trying to assume the role.

Describe the solution you'd like When inviting teams, users should be able to list all "data.all" teams (drop-down list). There should also be a "search feature" to find the correct team to invite based on it's name.

louishourcade avatar Jul 07 '22 13:07 louishourcade

Completely agree, or at least check the validity of a group

dlpzx avatar Jul 08 '22 12:07 dlpzx

Implementation details

Backend:

  • Add a new Cognito handler in backend/aws/handlers with a list Groups method [https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cognito-idp.html#CognitoIdentityProvider.Client.list_groups](boto3 call)
  • Add a new API of type Query in Groups object with its correspondent resolver that uses the Cognito handler

Frontend:

  • define a Groups object in src/api and add the definition of the API
  • modify the Environment view EnvironmentTeamInviteForm --> import the API + fetchGroups function with this API in useEffect + modify the textField to be a dropdown (Menu item) and map the values of fetchGroups with the values in this dropdown

dlpzx avatar Sep 26 '22 07:09 dlpzx

@dlpzx we also though about giving the user more information about the users associated to a group for example which relates to this feature request. Aside the Cognito pool integration are you also considering querying the Azure AD?

degoldner avatar Sep 26 '22 07:09 degoldner

Hi @degoldner, not yet. In the implementation we have created a new graphQL object called CognitoGroup. Right now it only includes the group name, but in the future it could also include other info such as "label" (for the case of non human readable names that come from azureAD) or even info about their creaton date...

dlpzx avatar Oct 17 '22 07:10 dlpzx

Included in v1.2.0 release

dlpzx avatar Nov 04 '22 09:11 dlpzx