Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin user cannot be created #187

Closed
rwaffen opened this issue Sep 21, 2023 · 1 comment · Fixed by #188
Closed

admin user cannot be created #187

rwaffen opened this issue Sep 21, 2023 · 1 comment · Fixed by #188
Labels
bug Something isn't working

Comments

@rwaffen
Copy link
Member

rwaffen commented Sep 21, 2023

hdm  | I, [2023-09-21T14:50:05.345675 #25]  INFO -- : [2ad17c8f-3afb-47b8-a1b6-62bfb1912e0d] Started GET "/" for 172.20.0.1 at 2023-09-21 14:50:05 +0200
hdm  | I, [2023-09-21T14:50:05.348066 #25]  INFO -- : [2ad17c8f-3afb-47b8-a1b6-62bfb1912e0d] Processing by PageController#index as HTML
hdm  | I, [2023-09-21T14:50:05.355589 #25]  INFO -- : [2ad17c8f-3afb-47b8-a1b6-62bfb1912e0d] Redirected to http://0.0.0.0:3000/users/new
hdm  | I, [2023-09-21T14:50:05.355697 #25]  INFO -- : [2ad17c8f-3afb-47b8-a1b6-62bfb1912e0d] Completed 302 Found in 8ms (ActiveRecord: 0.7ms | Allocations: 4095)
hdm  | I, [2023-09-21T14:50:05.361931 #25]  INFO -- : [272fd562-72f1-4e33-8325-bcfc8fcacc7c] Started GET "/users/new" for 172.20.0.1 at 2023-09-21 14:50:05 +0200
hdm  | I, [2023-09-21T14:50:05.362682 #25]  INFO -- : [272fd562-72f1-4e33-8325-bcfc8fcacc7c] Processing by UsersController#new as HTML
hdm  | I, [2023-09-21T14:50:05.371698 #25]  INFO -- : [272fd562-72f1-4e33-8325-bcfc8fcacc7c]   Rendered users/new.html.erb within layouts/application (Duration: 2.9ms | Allocations: 3766)
hdm  | I, [2023-09-21T14:50:05.374721 #25]  INFO -- : [272fd562-72f1-4e33-8325-bcfc8fcacc7c]   Rendered layout layouts/application.html.erb (Duration: 6.0ms | Allocations: 9936)
hdm  | I, [2023-09-21T14:50:05.374882 #25]  INFO -- : [272fd562-72f1-4e33-8325-bcfc8fcacc7c] Completed 200 OK in 12ms (Views: 6.8ms | ActiveRecord: 0.3ms | Allocations: 16944)
hdm  | I, [2023-09-21T14:50:21.762107 #25]  INFO -- : [62c53678-63c7-4c77-9e14-f4b917397e29] Started POST "/users" for 172.20.0.1 at 2023-09-21 14:50:21 +0200
hdm  | I, [2023-09-21T14:50:21.765430 #25]  INFO -- : [62c53678-63c7-4c77-9e14-f4b917397e29] Processing by UsersController#create as TURBO_STREAM
hdm  | I, [2023-09-21T14:50:21.765559 #25]  INFO -- : [62c53678-63c7-4c77-9e14-f4b917397e29]   Parameters: {"authenticity_token"=>"[FILTERED]", "user"=>{"first_name"=>"admin", "last_name"=>"admin", "email"=>"rw@betadots.de", "password"=>"[FILTERED]"}, "button"=>""}
hdm  | I, [2023-09-21T14:50:22.243010 #25]  INFO -- : [62c53678-63c7-4c77-9e14-f4b917397e29] Completed 500 Internal Server Error in 477ms (ActiveRecord: 0.6ms | Allocations: 2313)
hdm  | F, [2023-09-21T14:50:22.243256 #25] FATAL -- : [62c53678-63c7-4c77-9e14-f4b917397e29]
hdm  | [62c53678-63c7-4c77-9e14-f4b917397e29] NoMethodError (undefined method `admin=' for #<User id: nil, first_name: "admin", last_name: "admin", email: "rw@betadots.de", password_digest: [FILTERED], created_at: nil, updated_at: nil, role: "regular">):
hdm  | [62c53678-63c7-4c77-9e14-f4b917397e29]
hdm  | [62c53678-63c7-4c77-9e14-f4b917397e29] app/controllers/users_controller.rb:39:in `create'

@oneiros i think we somehow broke the user creation :(

@rwaffen rwaffen added the bug Something isn't working label Sep 21, 2023
oneiros added a commit that referenced this issue Sep 22, 2023
@oneiros
Copy link
Collaborator

oneiros commented Sep 22, 2023

Ah, sorry. That was an oversight when I added actual roles to support API-only users. I opened a PR with a fix: #188

oneiros added a commit that referenced this issue Nov 2, 2023
oneiros added a commit that referenced this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants