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 291952 Details for
Bug 427889
XMLRPC function nameToId
[?]
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 for WebService module that includes function login_to_id
WebService_User_id_login_conversion_patch (text/plain), 1.76 KB, created by
Noura El hawary
on 2008-01-17 04:50:25 UTC
(
hide
)
Description:
patch for WebService module that includes function login_to_id
Filename:
MIME Type:
Creator:
Noura El hawary
Created:
2008-01-17 04:50:25 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 17 Jan 2008 04:35:17 -0000 >@@ -113,6 +113,51 @@ > return { id => type('int')->value($user->id) }; > } > >+ >+# function to return userids from list of their login names >+# it will be called like this for example: >+# $call = $rpc->call( 'User.login_to_id', { logins => ['testusera@redhat.com', 'testuserb@redhat.com'] }); >+sub login_to_id { >+ my ($self, $params) = @_; >+ >+ my $logins = $params->{logins}; >+ >+ Bugzilla->user->in_group('editusers') >+ || ThrowUserError("auth_failure", { group => "editusers", >+ action => "use", >+ object => "users"}); >+ my @ids = >+ map {{ >+ $_ => Bugzilla::User::login_to_id($_), >+ } >+ } @$logins; >+ >+ return \@ids; >+} >+ >+ >+# function to return login names from a list of user ids >+# it will be called like this for example >+# $call = $rpc->call( 'User.id_to_login', { ids => [1,2,3] }); >+sub id_to_login { >+ my ($self, $params) = @_; >+ >+ my $user_ids = $params->{ids}; >+ >+ Bugzilla->user->in_group('editusers') >+ || ThrowUserError("auth_failure", { group => "editusers", >+ action => "use", >+ object => "users"}); >+ >+ my @logins = >+ map {{ >+ $_ => Bugzilla::User::user_id_to_login($_), >+ } >+ } @$user_ids; >+ >+ return \@logins; >+} >+ > 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 Raw
Actions:
View
Attachments on
bug 427889
:
291689
| 291952