Returning preferences
The only alternative is using a for comprehension:

for {
  hasAccess &lt;- canAccessPreferences(id)
  result &lt;- if (hasAccess)
    Future.successful(Forbidden)
  else
    doGetPreferences(id)

} yield result


Unfortunately you cannot use the if guard of the for because then you would get an exception if hasAccess is false. And since you're composing Future monads there's no way around the Future.successful either.