couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <>
Subject Re: hidden fields in a document
Date Sun, 20 Jun 2010 21:24:47 GMT
I suspect you could achieve what you're looking for with a rewrite
handler[1] and a show function[2] that rewrites "/db/mydoc" to

Check it out and see what you think.



On Sat, Jun 19, 2010 at 22:01, Pavan Kumar <> wrote:
> Hi ,
>  I have a need where certain fields in a document shouldn't seen while
> responding for GET document API's. For e.g the document store's certain
> fields which are internal to the application not to be seen by end user. The
> same is for design documents where i don't want the users to see my
> views,filters,validate_doc_update code. Similar to treating  _id and _rev as
> special fields, can we have double underscore fields which is special, e.g
> "__internalId". These fields are accessible to all view,shows etc but not
> for direct json out. In design documents we could change the name of view
> field to "__views". Let only "admin" role uses only access these fields.
>  There must be surely a better way to achieve the same need ?
>  To avoid exposing out internal details we could place an intermediary app
> layer, but just was thinking if this could be useful to have feature like
> this in couchdb itself.
> regards,
> Pavan

View raw message