-- = Listing available files
-- | provide data from a user-list request
listProvider :: ListRequest -> Query Morgue ListData
listProvider req = do
    morgue <- ask
    return ( getOne $ allUsers morgue @= user
           , toList $ allGroups morgue @= userName user
           )
    where user = lRqUser req

-- | list all files from a user and a list of groups
listProvider :: ListRequest -> Query Morgue ListData
listProvider req = do
    morgue <- ask
    return ( getOne $ allUsers morgue @= user
           , toList $ allGroups morgue @= userName user
           )
    where user = lRqUser req

-- | list all files from a user and a list of groups
listProvider req = do
    morgue <- ask
    return ( getOne $ allUsers morgue @= user
           , toList $ allGroups morgue @= userName user
           )
    where user = lRqUser req

-- | list all files from a user and a list of groups