Skip to content

Commit

Permalink
#1410 Add mfa, hasKey and hasPassword properties in users
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 22, 2020
1 parent 4560cbc commit 1715ba5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thehive/app/org/thp/thehive/controllers/v1/Properties.scala
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ class Properties @Inject() (
.property("name", UniMapping.string)(_.field.readonly)
.property("locked", UniMapping.boolean)(_.field.readonly)
.property("avatar", UniMapping.string.optional)(_.select(_.avatar.attachmentId.map(id => s"/api/datastore/$id")).readonly)
.property("mfa", UniMapping.boolean)(_.select(_.totpSecret.fold.map(!_.isEmpty)).readonly)
.property("hasKey", UniMapping.boolean)(_.select(_.apikey.fold.map(!_.isEmpty)).readonly)
.property("hasPassword", UniMapping.boolean)(_.select(_.password.fold.map(!_.isEmpty)).readonly)
.build

lazy val observable: List[PublicProperty[_, _]] =
Expand Down

0 comments on commit 1715ba5

Please sign in to comment.