A plugin of Mongoose for formatting the output of a model depending on the grants allowed