Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 292108 Details for
Bug 427893
XMLRPC functions idToName and nameToId replaced by User.get() function
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
xmlrpc function User.get()
WebService_user_get_patch (text/plain), 1.76 KB, created by
Noura El hawary
on 2008-01-18 04:50:35 UTC
(
hide
)
Description:
xmlrpc function User.get()
Filename:
MIME Type:
Creator:
Noura El hawary
Created:
2008-01-18 04:50:35 UTC
Size:
1.76 KB
patch
obsolete
>Index: Bugzilla/WebService/User.pm >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/Bugzilla/WebService/User.pm,v >retrieving revision 1.1.1.1 >diff -u -r1.1.1.1 User.pm >--- Bugzilla/WebService/User.pm 19 Nov 2007 22:11:21 -0000 1.1.1.1 >+++ Bugzilla/WebService/User.pm 18 Jan 2008 04:38:07 -0000 >@@ -113,6 +113,44 @@ > return { id => type('int')->value($user->id) }; > } > >+ >+# function to return user information by passing either: >+# 1- list of user ids as the following: >+# $call = $rpc->call( 'User.get', { ids => [1,2,3] }); >+# 2- list of login names as the following: >+# $call = $rpc->call( 'User.get', { logins => ['testusera@redhat.com', 'testuserb@redhat.com'] }); >+sub get { >+ my ($self, $params) = @_; >+ >+ Bugzilla->user->in_group('editusers') >+ || ThrowUserError("auth_failure", { group => "editusers", >+ action => "use", >+ object => "users"}); >+ >+ my @user_objs; >+ >+ if ( $params->{ids} ){ >+ @user_objs = map new Bugzilla::User($_), @{ $params->{ids} }; >+ } >+ else { >+ my @ids = map Bugzilla::User::login_to_id($_), @{ $params->{logins} }; >+ @user_objs = map new Bugzilla::User($_), @ids; >+ } >+ >+ my @users = >+ map {{ >+ id => type('int')->value($_->id), >+ realname => type('string')->value($_->name), >+ login => type('string')->value($_->login), >+ disabledtext => type('string')->value($_->disabledtext), >+ disable_mail => type('int')->value($_->{disable_mail}), >+ groups => $_->groups, >+ bless_groups => $_->bless_groups, >+ }} @user_objs; >+ >+ return { users => \@users }; >+} >+ > 1; > > __END__
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 427893
:
291690
|
291953
|
292108
|
295913
|
296196
|
296210
|
296303