Fix bug where incomplete data on views were being returned for permissions

This commit is contained in:
Everett Sochowski 2014-02-11 12:33:46 +01:00
parent 8219cd3865
commit a854705ef2

View File

@ -487,7 +487,7 @@ class MongoDBLocalStorage extends LocalStorage {
acc <- HostedAccount.find(By(HostedAccount.accountID,account.id))
} yield {
val views: List[ViewImpl] = ViewImpl.findAllFields(Seq[SelectableField](ViewImpl.id_), By(ViewImpl.account, acc), By(ViewImpl.isPublic_, false))
val views: List[ViewImpl] = ViewImpl.findAll(By(ViewImpl.account, acc), By(ViewImpl.isPublic_, false))
//all the user that have access to at least to a view
val users = views.map(_.users.toList).flatten.distinct
val usersPerView = views.map(v =>(v, v.users.toList))