diff --git a/ScalliGraph b/ScalliGraph index 524d49d18b..8a522c7d9b 160000 --- a/ScalliGraph +++ b/ScalliGraph @@ -1 +1 @@ -Subproject commit 524d49d18bac9962e2818f41f4e6e617ef79b265 +Subproject commit 8a522c7d9b13d20c9bf65ff8bb0ad55e4594c08f diff --git a/thehive/app/org/thp/thehive/controllers/v0/UserCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/UserCtrl.scala index b2bfa3af0f..3a8483ffdf 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/UserCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/UserCtrl.scala @@ -283,6 +283,7 @@ class PublicUser @Inject() (userSrv: UserSrv, organisationSrv: OrganisationSrv) } } ) + .property("profile", UMapping.string)(_.authSelect((users, authContext) => users.profile(authContext.organisation).value(_.name)).readonly) .build } diff --git a/thehive/app/org/thp/thehive/controllers/v1/Properties.scala b/thehive/app/org/thp/thehive/controllers/v1/Properties.scala index 117ffde561..26e956f0fa 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/Properties.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/Properties.scala @@ -422,6 +422,7 @@ class Properties @Inject() ( .property("name", UMapping.string)(_.field.readonly) .property("locked", UMapping.boolean)(_.field.readonly) .property("avatar", UMapping.string.optional)(_.select(_.avatar.value(_.attachmentId).domainMap(id => s"/api/datastore/$id")).readonly) + .property("profile", UMapping.string)(_.authSelect((users, authContext) => users.profile(authContext.organisation).value(_.name)).readonly) .build lazy val observable: PublicProperties =