provider-gitlab icon indicating copy to clipboard operation
provider-gitlab copied to clipboard

Managing members by member email or username

Open IvanTurgenev1 opened this issue 2 years ago • 1 comments

Is it possibly to use useremail or username instead of userid?

kind: Member
metadata:
  name: admin-member
spec:
  forProvider:
    groupIdRef:
      name: crossplane-example
    userID: [email protected]
    accessLevel: 50
  providerConfigRef:
    name: gitlab-provider
  writeConnectionSecretToRef:
    name: gitlab-group-example-member
    namespace: crossplane-system

IvanTurgenev1 avatar Oct 05 '22 10:10 IvanTurgenev1

I don't think that's possible with the gitlab api. Would you mind filing a feature request upstream at https://gitlab.com/gitlab-org/omnibus-gitlab?

janwillies avatar Oct 12 '22 11:10 janwillies

AFAIK it is not possible to reference users directly but one could implement a spec.forProvider.userIdByUserName helper field that makes the controller look up the user ID at runtime if userId is not set. The Gitlab API itself supports searching users by their username.

MisterMX avatar Jul 25 '23 14:07 MisterMX