Actions
Bug #3280
closedAPI gives errors when user logins are turned off
Description
Configure foreman with login: false, try hammer:
undefined method `user' for nil:NilClass (NoMethodError) /home/lzap/work/foreman/app/controllers/api/base_controller.rb:81:in `authorize' /home/lzap/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:420:in `block (2 levels) in _run__3776958164675687506__process_action__3032593481822066504__callbacks' /home/lzap/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_1291' /home/lzap/work/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' /home/lzap/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1291'
Updated by Dominic Cleal about 11 years ago
- Project changed from Foreman to Hammer CLI
- Category deleted (
44)
Updated by Dominic Cleal about 11 years ago
- Project changed from Hammer CLI to Foreman
- Subject changed from Hammer does not work against foreman with login turned off to API gives errors when user logins are turned off
- Category set to API
Updated by Daniel Lobato Garcia about 11 years ago
This is currently failing from the Foreman side, API requests return 401 Unauthorized when login:false.
From Hammer this is seen like: "Invalid username or password", or "RestClient::Unauthorized (401 Unauthorized):" if --verbose is set. That sounds good to me.
Curl or any other API clients will get also "{"message":"Unable to authenticate user "}".
Maybe after it's fixed in Foreman it'll still fail in Hammer though!
Updated by Daniel Lobato Garcia about 11 years ago
Updated by Dominic Cleal about 11 years ago
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Target version set to 1.9.3
Updated by Dominic Cleal about 11 years ago
- Translation missing: en.field_release set to 2
Updated by Daniel Lobato Garcia about 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a1b8169ff29c725edd4ee51d83aaf31c7be011ec.
Actions