Skip to content

Commit

Permalink
#158 Fix checks in user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Dec 20, 2018
1 parent b593475 commit 1aaf218
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/org/thp/cortex/controllers/UserCtrl.scala
Expand Up @@ -42,7 +42,7 @@ class UserCtrl @Inject() (
if organization.status() == OrganizationStatus.Active &&
(request.roles.contains(Roles.superAdmin) ||
(userOrganizationId == organizationId &&
!request.body.getStrings("roles").getOrElse(Nil).contains(Roles.superAdmin.toString)))
!request.body.getStrings("roles").getOrElse(Nil).contains(Roles.superAdmin.name)))
user userSrv.create(request.body.set("organization", organizationId))
} yield renderer.toOutput(CREATED, user))
.recoverWith {
Expand Down

0 comments on commit 1aaf218

Please sign in to comment.