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

New created User can't join after Update to 2.6 #1689

Closed
Schmidie64 opened this issue May 28, 2020 · 8 comments · Fixed by #1690
Closed

New created User can't join after Update to 2.6 #1689

Schmidie64 opened this issue May 28, 2020 · 8 comments · Fixed by #1690
Labels

Comments

@Schmidie64
Copy link

Hello everyone,
I found an error with the update. If I use the command to create a new user from the documentation using the console, the user cannot log on. I get the following error message in the log:
INFO: [4cebc900-3e35-49cb-81d0-996b03e32c74] method=POST path=/b/u/login format=html controller=SessionsController action=create status=500 error='NoMethodError: undefined method get_permission for nil:NilClass' duration=298.09 view=0.00 db=1.20 host=greenlight FATAL: [4cebc900-3e35-49cb-81d0-996b03e32c74] FATAL: [4cebc900-3e35-49cb-81d0-996b03e32c74] NoMethodError (undefined method get_permission for nil:NilClass): FATAL: [4cebc900-3e35-49cb-81d0-996b03e32c74] FATAL: [4cebc900-3e35-49cb-81d0-996b03e32c74] app/controllers/concerns/authenticator.rb:49:in check_email_verified [4cebc900-3e35-49cb-81d0-996b03e32c74] app/controllers/concerns/authenticator.rb:32:in login [4cebc900-3e35-49cb-81d0-996b03e32c74] app/controllers/sessions_controller.rb:94:in create INFO: [4cebc900-3e35-49cb-81d0-996b03e32c74] method=POST path=/b/500 format=html controller=ErrorsController action=internal_error status=500 error=ActionView::Template::Error: undefined method get_permission for nil:NilClass duration=20.41 view=0.00 db=0.31 host=greenlight
I guess that Update does not cover this case. It would be nice if the problem could be solved quickly :)

@farhatahmad
Copy link
Collaborator

Good catch. The rake task is missing a line for setting the users role, which is resulting in a 500 error for users created through the rake task. I'll get this fixed and released in the next version

@KurJay
Copy link

KurJay commented May 28, 2020

Same add user from the console at admin panel do not show and try to login error 500

500 Internal Server Error
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.

INFO: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] Support: dino@jaring.in is attempting to login.
INFO: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] Support: dino@jaring.in has successfully logged in.
INFO: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] method=POST path=/b/u/login format=html controller=SessionsController action=create status=500 error='NoMethodError: undefined method get_permission' for nil:NilClass' duration=405.07 view=0.00 db=1.73 host=greenlight FATAL: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] FATAL: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] NoMethodError (undefined method get_permission' for nil:NilClass):
FATAL: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6]
FATAL: [05e26e7b-fa4b-4ad8-9eb4-d2d2edb5a5a6] app/controllers/concerns/authenticator.rb:49:in `check_email_verified'

I try other server have not update can add user from console

Regards

@KurJay
Copy link

KurJay commented May 28, 2020

Good catch. The rake task is missing a line for setting the users role, which is resulting in a 500 error for users created through the rake task. I'll get this fixed and released in the next version

Great Thanks.

@KurJay
Copy link

KurJay commented May 28, 2020

Dear @farhatahmad i see that you already fixed it. How we fixed it?
Regards

@Schmidie64
Copy link
Author

Dear @farhatahmad thanks for the fix. I applied your PR on my test-system. Now i can create a user via command line.
But there is an another error. By default i create a "normal" user without the permission to create rooms. Now the user can login. But if I now give the user the right to create rooms, I get a 500 error or a 404. Apparently no view can be built because the user has no room. Can anyone confirm the bug?

@farhatahmad
Copy link
Collaborator

I knew I had forgotten something. I need to add extra logic in the case where the user is given a role that originally doesn't have "Can create rooms" enabled, but later on gets enabled

@farhatahmad
Copy link
Collaborator

@Schmidie64 should be fixed in #1694

@Schmidie64
Copy link
Author

Thank you very much @farhatahmad :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants