Actions
Defect #12472
closedRoles REST API does not accept API authentication
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
While using the Roles REST API, I encountered a bogus issue with authentication while the global setting "Authentication required" was on : I could not fetch /roles.{json|xml}, I always got a 401 whatever auth I tried (cookie, plain, header).
The following patch against SVN trunk should fix it, at least it works correctly now for me :
Index: app/controllers/roles_controller.rb =================================================================== --- app/controllers/roles_controller.rb (revision 10851) +++ app/controllers/roles_controller.rb (working copy) @@ -19,8 +19,8 @@ layout 'admin' before_filter :require_admin, :except => [:index, :show] - before_filter :require_admin_or_api_request, :only => [:index, :show] before_filter :find_role, :only => [:show, :edit, :update, :destroy] + accept_api_auth :index, :show def index respond_to do |format|
Related issues
Actions