Commit fadfeae8 authored by Tobias Gall's avatar Tobias Gall
Browse files

if login for new users

assign role if role is nil
parent 31e54f53
Pipeline #36528 failed with stage
......@@ -233,7 +233,9 @@ class SessionsController < ApplicationController
# don't override any role with lower prio
wanted_roles.each{|wanted_role|
if wanted_role.priority < user.role.priority
if user.role.nil?
user.set_role(wanted_role.name)
elsif wanted_role.priority < user.role.priority
user.set_role(wanted_role.name)
end
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment