From 652162528ea2d269081850ea50063eb04dcaf0ad Mon Sep 17 00:00:00 2001 From: Youri K Date: Wed, 6 Jun 2018 09:29:47 +0200 Subject: [PATCH] allow refresh datasets for teammanagers #2592 --- app/controllers/UserTokenController.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/UserTokenController.scala b/app/controllers/UserTokenController.scala index f6786744ab..3f36a11375 100644 --- a/app/controllers/UserTokenController.scala +++ b/app/controllers/UserTokenController.scala @@ -87,7 +87,7 @@ class UserTokenController @Inject()(val messagesApi: MessagesApi) def tryAdministrate: Fox[UserAccessAnswer] = { userBox match { - case Full(user) => Fox.successful(UserAccessAnswer(user.isAdmin)) + case Full(user) => Fox.successful(UserAccessAnswer(user.isAdmin || user.teamManagerTeams.nonEmpty)) case _ => Fox.successful(UserAccessAnswer(false, Some("invalid access token"))) } }