Skip to content

Search user by key #45

@WayneSpiteri

Description

@WayneSpiteri

Is your feature request related to a problem? Please describe.
When i read certain pages on our confluence i get back the ri:user that has a userkey identifier. In order to retrieve the user i need to be able to search by key instead of username and accountId

Describe the solution you'd like
To support this, in the user.go file change this

if strings.Contains(query, ":") {
	data.Set("accountId", strings.Split(query, ":")[1])
} else {
	data.Set("username", query)
}

to this

if strings.Contains(query, ":") {
	customLookup := strings.Split(query, ":")
	if customLookup[0] == "key" {
		data.Set("key", customLookup[1])
	} else {
		data.Set("accountId", customLookup[1])
	}
} else {
	data.Set("username", query)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions