master
E. Almqvist 3 years ago
parent 2c89cafc15
commit 1ec469ba1e
  1. 9
      src/db_models.rb

@ -18,12 +18,13 @@ class User < EntityModel
end end
def role def role
if roles.length > 0 then user_roles = roles
role = roles.max_by { |role| role.flags } p user_roles
if user_roles.length > 0 then
role = user_roles.max_by { |role| role.flags }
return role.name return role.name
else
return ""
end end
return ""
end end
def roles def roles

Loading…
Cancel
Save