Skip to content

Commit

Permalink
#1323 Migration: accept user without roles
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed May 16, 2020
1 parent 6db5c95 commit 00832aa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ trait Conversion {
status <- (json \ "status").validate[String]
locked = status == "Locked"
password <- (json \ "password").validateOpt[String]
role <- (json \ "roles").validate[Seq[String]]
role <- (json \ "roles").validateOpt[Seq[String]].map(_.getOrElse(Nil))
profile = if (role.contains("admin")) ProfileSrv.admin.name
else if (role.contains("write")) ProfileSrv.analyst.name
else if (role.contains("read")) ProfileSrv.readonly.name
Expand Down

0 comments on commit 00832aa

Please sign in to comment.