On Wed, Jun 14, 2017 at 03:36:50PM +0200, Daniel Lobato Garcia wrote:
> On 06/14, Marc Haber wrote:
> > I have a Foreman 1.12 installation with a number of users pulled in from
> > LDAP. Most of my users are Administrators (yes, we're planning to change
> > that).
> >
> > Now I want to make new colleagues Admins as well. I click on Administer
> > => Users, click on the user's Username in the leftmost column, navigate
> > to the "Roles" tab. In there, I check the "Administrator" checkbox,
> > click on submit. Foreman then returns me to the users list, with the
> > "Administrator" field on the user that I just edited still unchecked,
> > Shift-reload doesn't change that, and when I click on the User again the
> > Administrator checkbox is unchecked again.
> 
> Have you tried changing it through the API?

No, and frankly, I don't have the slightest idea how to do that. I have
never managed user through the API.

> Can you give us the logs (/var/log/foreman/production.log) you get when
> you try to make another user administrator? I'm guessing there's some
> kind of error that's not showing up on the UI, but the logs should
> contain something.

Unfortunately, they don't.

2017-06-14 16:00:26 [app] [I] Started GET "/users/28-theuser/edit" for 
192.0.2.233 at 2017-06-14 16:00:26 +0200 
2017-06-14 16:00:26 [app] [I] Processing by UsersController#edit as */*
2017-06-14 16:00:26 [app] [I]   Parameters: {"id"=>"28-theuser"}
2017-06-14 16:00:26 [app] [D] Setting current user thread-local variable to 
myuser
2017-06-14 16:00:26 [app] [D] Setting current location thread-local variable to 
none
2017-06-14 16:00:26 [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb 
(6.5ms)
2017-06-14 16:00:26 [app] [I]   Rendered users/_form.html.erb (21.5ms)
2017-06-14 16:00:26 [app] [I]   Rendered users/edit.html.erb (21.8ms)
2017-06-14 16:00:26 [app] [I] Completed 200 OK in 39ms (Views: 19.2ms | 
ActiveRecord: 6.8ms)
2017-06-14 16:00:31 [app] [I] Started PATCH "/users/28-theuser" for 192.0.2.233 
at 2017-06-14 16:00:31 +0200
2017-06-14 16:00:31 [app] [I] Processing by UsersController#update as */*
2017-06-14 16:00:31 [app] [I]   Parameters: {"utf8"=>"✓", 
"authenticity_token"=>"redacted", "user"=>{"login"=>"theuser", 
"firstname"=>"firstname", "lastname"=>"lastname", 
"mail"=>"[email protected]", "locale"=>"", "timezone"=>"", 
"auth_source_id"=>"3", "password"=>"[FILTERED]", 
"password_confirmation"=>"[FILTERED]", "mail_enabled"=>"1", "admin"=>"1", 
"role_ids"=>["9", ""], "location_ids"=>[""], "default_location_id"=>""}, 
"id"=>"28-theuser"}
2017-06-14 16:00:31 [app] [D] Setting current user thread-local variable to 
myuser
2017-06-14 16:00:31 [app] [D] Setting current location thread-local variable to 
none
2017-06-14 16:00:31 [app] [I] Expire fragment views/tabs_and_title_records-28 
(0.1ms)
2017-06-14 16:00:31 [app] [I] Redirected to https://foremanhost.example/users
2017-06-14 16:00:31 [app] [I] Completed 302 Found in 20ms (ActiveRecord: 3.3ms)
2017-06-14 16:00:31 [app] [I] Started GET "/users" for 192.0.2.233 at 
2017-06-14 16:00:31 +0200
2017-06-14 16:00:31 [app] [I] Processing by UsersController#index as */*
2017-06-14 16:00:31 [app] [D] Setting current user thread-local variable to 
myuser
2017-06-14 16:00:31 [app] [D] Setting current location thread-local variable to 
none
2017-06-14 16:00:31 [app] [I]   Rendered users/index.html.erb within 
layouts/application (61.8ms)
2017-06-14 16:00:31 [app] [I]   Rendered common/_searchbar.html.erb (4.2ms)
2017-06-14 16:00:31 [app] [I]   Rendered layouts/_application_content.html.erb 
(4.5ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_user_dropdown.html.erb (1.2ms)
2017-06-14 16:00:31 [app] [I] Read fragment views/tabs_and_title_records-23 
(0.1ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_location_dropdown.html.erb 
(8.2ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_org_switcher.html.erb (10.6ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_submenu.html.erb (2.5ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_submenu.html.erb (1.5ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_submenu.html.erb (1.3ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_submenu.html.erb (1.0ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_submenu.html.erb (1.3ms)
2017-06-14 16:00:31 [app] [I] Write fragment views/tabs_and_title_records-23 
(0.5ms)
2017-06-14 16:00:31 [app] [I]   Rendered home/_topbar.html.erb (26.8ms)
2017-06-14 16:00:31 [app] [I]   Rendered layouts/base.html.erb (27.6ms)
2017-06-14 16:00:31 [app] [I] Completed 200 OK in 104ms (Views: 92.8ms | 
ActiveRecord: 3.6ms)
2017-06-14 16:00:36 [app] [I] Started GET "/users" for 192.0.2.233 at 
2017-06-14 16:00:36 +0200
2017-06-14 16:00:36 [app] [I] Processing by UsersController#index as HTML
2017-06-14 16:00:36 [app] [D] Setting current user thread-local variable to 
myuser
2017-06-14 16:00:36 [app] [D] Setting current location thread-local variable to 
none
2017-06-14 16:00:36 [app] [I]   Rendered users/index.html.erb within 
layouts/application (61.0ms)
2017-06-14 16:00:36 [app] [I]   Rendered common/_searchbar.html.erb (3.6ms)
2017-06-14 16:00:36 [app] [I]   Rendered layouts/_application_content.html.erb 
(3.9ms)
2017-06-14 16:00:36 [app] [I]   Rendered home/_user_dropdown.html.erb (1.1ms)
2017-06-14 16:00:36 [app] [I] Read fragment views/tabs_and_title_records-23 
(0.1ms)
2017-06-14 16:00:36 [app] [I]   Rendered home/_topbar.html.erb (3.0ms)
2017-06-14 16:00:36 [app] [I]   Rendered layouts/base.html.erb (3.7ms)
2017-06-14 16:00:36 [app] [I] Completed 200 OK in 78ms (Views: 67.7ms | 
ActiveRecord: 3.3ms)

> By the way - I tried doing this on 1.15 too, and it works, so if you can
> update, most likely you'd get this fixed.

Working on that, but not RSN.

Greetings
Marc
-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to