Skip to content

Commit 784f89d

Browse files
committed
Remove support for soon-to-be-deprecated user API calls
Due to privacy restrictions, the API will soon restrict the ability to retrieve user info using anything but an account ID. Finding users via other fields must go through /user/search. As such, getUser (which was already redundant with getUserByEmail) has been removed, and dependent procs updated to use getUserByEmail (which uses the /search endpoint).
1 parent d825055 commit 784f89d

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

package/main.tcl

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -492,31 +492,6 @@ namespace eval ::jira {
492492
return 0
493493
}
494494
}
495-
496-
#
497-
# Given a username (eg "fred"), get user data and store in _result
498-
#
499-
# See https://docs.atlassian.com/jira/REST/cloud/#api/2/user-getUser
500-
#
501-
proc getUser {key _result args} {
502-
::jira::parse_args args argarray
503-
upvar 1 $_result result
504-
unset -nocomplain result
505-
506-
if {$key == ""} {
507-
set url "[::jira::baseurl]/rest/api/2/myself"
508-
} else {
509-
set url "[::jira::baseurl]/rest/api/2/user?username=$key"
510-
}
511-
512-
513-
if {[::jira::raw $url GET json]} {
514-
array set result [::yajl::json2dict $json(data)]
515-
return 1
516-
} else {
517-
return 0
518-
}
519-
}
520495

521496
#
522497
# Given an email address, try to find a user with that address. This proc only
@@ -799,7 +774,7 @@ namespace eval ::jira {
799774
return
800775
}
801776

802-
::jira::getUser $key getUserResult
777+
::jira::getUserByEmail $key getUserResult
803778

804779
set keyMap [list self displayName active]
805780

0 commit comments

Comments
 (0)