Project

General

Profile

Defect #28001

Updated by Toshi MARUYAMA over 7 years ago

Querying the custom_fields using the API: 

 <pre> 
 wget -O - --header='Accept: application/json' --header='X-Redmine-API-Key: mykey' "http://server:3000/custom_fields.json"                                         
 </pre> 

 fails with "401 Unauthorized Username/Password - Authentication Failed." 

 Log: 

 <pre> 
 Started GET "/custom_fields.json" for 10.144.178.63 at 2018-01-16 15:57:06 +0000 
 Processing by CustomFieldsController#index as JSON 
   Current user: anonymous 
 Filter chain halted as :require_admin rendered or redirected 
 Completed 401 Unauthorized in 6ms (ActiveRecord: 1.2ms) 
 </pre> 

 Whereas querying the users with the same credentials succeeds: 

 <pre> 
 wget -O - --header='Accept: application/json' --header='X-Redmine-API-Key: mykey' "http://server:3000/users.json"                                         
 </pre>  

 Log: 

 <pre> 
 Started GET "/users.json" for 10.144.178.63 at 2018-01-16 15:58:05 +0000 
 Processing by UsersController#index as JSON 
   Current user: weo (id=5) 
   Rendered users/index.api.rsb (17.5ms) 
 Completed 200 OK in 38ms (Views: 17.7ms | ActiveRecord: 4.5ms) 
 </pre> 

 <pre> 
 


 Environment: 
   Redmine version                  3.4.4.stable 
   Ruby version                     2.4.3-p205 (2017-12-14) [x86_64-linux] 
   Rails version                    4.2.8 
   Environment                      production 
   Database adapter                 Mysql2 
 SCM: 
   Subversion                       1.8.10 
   Mercurial                        3.1.2 
   Bazaar                           2.7.0 
   Git                              2.1.4 
   Filesystem                      
 Redmine plugins: 
   a_common_libs                    2.3.3 
   redmine_image_clipboard_paste    3.3.0 
   redmine_issue_tabs               1.2.3 
   sidebar_hide                     0.0.8 
 </pre>

Back